-
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
Migrate processor to the new global registry #7396
Migrate processor to the new global registry #7396
Conversation
libbeat/processors/feature.go
Outdated
}) | ||
} | ||
|
||
type Constructor func(config *common.Config) (Processor, error) |
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.
exported type Constructor should have comment or be unexported
libbeat/processors/feature.go
Outdated
constr Constructor | ||
} | ||
|
||
func Plugin(name string, c Constructor) map[string][]interface{} { |
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.
exported function Plugin should have comment or be unexported
) | ||
|
||
// Feature exposes add_host_metadata. | ||
var Feature = processors.Feature(processorName, newHostMetadataProcessor, feature.Stable) |
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.
Is this variable here used for something?
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.
Yes this is used by the global registry, see comment #7392 (comment) for a bit more details about the usage.
9e1eb99
to
4d20a63
Compare
4d20a63
to
054fbdf
Compare
A little sad the The way it was used:
The Namespace ensured |
@urso I think this can still be done with a flat structure and handled at the processor level instead. in a flat view the namespace will be "libbeat.processor.lookup", so when we create the processor "lookup", he can create the exec or file. We cannot assume that But, we can provide code to wrap a nested processor. |
Another way to look at it, is `lookup' is a bundle of two features file and exec. |
054fbdf
to
e4fd51f
Compare
@urso I've moved the code to use feature.NewDetails and rebased the code, all the "actions" processors expose a Bundle that we can register in the include package. All the other processors expose a unique feature. This is ready for review and be merged into the feature branch. |
depends on #7392