Skip to content

Commit

Permalink
[heartbeat] disable browser code on windows via build tags (#32939)
Browse files Browse the repository at this point in the history
None of this is supported or works there, so we should just disable it.
Fixes #32937

No release notes necessary since there are no user facing changes
  • Loading branch information
andrewvc authored Aug 31, 2022
1 parent 5eb9a13 commit 86f07ed
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 1 deletion.
12 changes: 12 additions & 0 deletions x-pack/heartbeat/import.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package main

import (
_ "github.com/elastic/beats/v7/x-pack/heartbeat/monitors/browser"
)
1 change: 0 additions & 1 deletion x-pack/heartbeat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

_ "github.com/elastic/beats/v7/heartbeat/include"
"github.com/elastic/beats/v7/x-pack/heartbeat/cmd"
_ "github.com/elastic/beats/v7/x-pack/heartbeat/monitors/browser"
)

func main() {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/browser.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package browser

Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package browser

import (
Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/config_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package browser

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/project.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package browser

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/project_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package browser

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/source.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/synthexec/enrich.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package synthexec

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/synthexec/enrich_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package synthexec

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package synthexec

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package synthexec

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/synthexec/synthexec.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package synthexec

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package synthexec

Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/synthexec/synthexec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package synthexec

import (
Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/synthexec/synthtypes.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package synthexec

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package synthexec

Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/synthexec/testcmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package main

import (
Expand Down

0 comments on commit 86f07ed

Please sign in to comment.