Skip to content

Commit

Permalink
Use LoggingProcessorMixin for readability purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscovalentecastro committed Feb 21, 2025
1 parent ddd00c0 commit eee0170
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions confgenerator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,11 @@ type LoggingProcessor interface {
Components(ctx context.Context, tag string, uid string) []fluentbit.Component
}

type LoggingProcessorMixin interface {
Type() string
Components(ctx context.Context, tag string, uid string) []fluentbit.Component
}

var LoggingProcessorTypes = &componentTypeRegistry[LoggingProcessor, loggingProcessorMap]{
Subagent: "logging", Kind: "processor",
}
Expand Down
2 changes: 1 addition & 1 deletion confgenerator/logging_receivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ func init() {
LoggingReceiverTypes.RegisterType(func() LoggingReceiver { return &LoggingReceiverSystemd{} }, platform.Linux)
}

type LoggingCompositeReceiver[R LoggingReceiverMixin, P LoggingProcessor] struct {
type LoggingCompositeReceiver[R LoggingReceiverMixin, P LoggingProcessorMixin] struct {
ProcessorMixin P `yaml:",inline"`
ReceiverMixin R `yaml:",inline"`
}
Expand Down

0 comments on commit eee0170

Please sign in to comment.