Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Add etcdbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
berfinsari committed Aug 15, 2017
1 parent dd50fc2 commit 53ed0ac
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
27 changes: 27 additions & 0 deletions config/config.go
@@ -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
}
3 changes: 3 additions & 0 deletions config/config_test.go
@@ -0,0 +1,3 @@
// +build !integration

package config
16 changes: 16 additions & 0 deletions main.go
@@ -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)
}
}
22 changes: 22 additions & 0 deletions main_test.go
@@ -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()
}
}

0 comments on commit 53ed0ac

Please sign in to comment.