-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify publisher pipeline #772
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,13 +28,13 @@ import ( | |
"runtime" | ||
"sync" | ||
|
||
"github.com/satori/go.uuid" | ||
|
||
"github.com/elastic/beats/libbeat/cfgfile" | ||
"github.com/elastic/beats/libbeat/logp" | ||
"github.com/elastic/beats/libbeat/outputs" | ||
"github.com/elastic/beats/libbeat/publisher" | ||
"github.com/elastic/beats/libbeat/service" | ||
|
||
"github.com/satori/go.uuid" | ||
) | ||
|
||
// Beater interface that every beat must use | ||
|
@@ -56,12 +56,13 @@ type FlagsHandler interface { | |
|
||
// Basic beat information | ||
type Beat struct { | ||
Name string | ||
Version string | ||
Config *BeatConfig | ||
BT Beater | ||
Events publisher.Client | ||
UUID uuid.UUID | ||
Name string | ||
Version string | ||
Config *BeatConfig | ||
BT Beater | ||
Publisher *publisher.PublisherType | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Naming makes now much more sense. |
||
Events publisher.Client | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably rename this to Client? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. didn't want to change too much ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
UUID uuid.UUID | ||
|
||
exit chan struct{} | ||
error error | ||
|
@@ -212,6 +213,7 @@ func (b *Beat) LoadConfig() error { | |
return fmt.Errorf("error Initialising publisher: %v\n", err) | ||
} | ||
|
||
b.Publisher = pub | ||
b.Events = pub.Client() | ||
|
||
logp.Info("Init Beat: %s; Version: %s", b.Name, b.Version) | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference: #778