This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd50fc2
commit 53ed0ac
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Config is put into a different package to prevent cyclic imports in case | ||
// it is needed in several locations | ||
|
||
package config | ||
|
||
type EtcdbeatConfig struct { | ||
Period *int64 | ||
Port *string | ||
Host *string | ||
|
||
// Authentication for BasicAuth | ||
Authentication struct { | ||
Enable *bool | ||
Username *string | ||
Password *string | ||
} | ||
|
||
Statistics struct { | ||
Leader *bool | ||
Self *bool | ||
Store *bool | ||
} | ||
} | ||
|
||
type ConfigSettings struct { | ||
Input EtcdbeatConfig | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// +build !integration | ||
|
||
package config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/elastic/beats/libbeat/beat" | ||
|
||
"github.com/gamegos/etcdbeat/beater" | ||
) | ||
|
||
func main() { | ||
err := beat.Run("etcdbeat", "", beater.New) | ||
if err != nil { | ||
os.Exit(1) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package main | ||
|
||
// This file is mandatory as otherwise the etcdbeat.test binary is not generated correctly. | ||
|
||
import ( | ||
"flag" | ||
"testing" | ||
) | ||
|
||
var systemTest *bool | ||
|
||
func init() { | ||
systemTest = flag.Bool("systemTest", false, "Set to true when running system tests") | ||
} | ||
|
||
// Test started when the test binary is started. Only calls main. | ||
func TestSystem(t *testing.T) { | ||
|
||
if *systemTest { | ||
main() | ||
} | ||
} |