adjust userlog service

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2023-08-18 11:20:32 +02:00
parent 1bfdc43054
commit 91176db30d
8 changed files with 31 additions and 59 deletions
+4 -4
View File
@@ -28,7 +28,7 @@ type Options struct {
Flags []cli.Flag
Namespace string
Store store.Store
Consumer events.Consumer
Stream events.Stream
GatewaySelector pool.Selectable[gateway.GatewayAPIClient]
HistoryClient ehsvc.EventHistoryService
ValueClient settingssvc.ValueService
@@ -97,10 +97,10 @@ func Store(store store.Store) Option {
}
}
// Consumer provides a function to configure the consumer
func Consumer(consumer events.Consumer) Option {
// Stream provides a function to configure the stream
func Stream(stream events.Stream) Option {
return func(o *Options) {
o.Consumer = consumer
o.Stream = stream
}
}
+1 -1
View File
@@ -80,7 +80,7 @@ func Server(opts ...Option) (http.Service, error) {
handle, err := svc.NewUserlogService(
svc.Logger(options.Logger),
svc.Consumer(options.Consumer),
svc.Stream(options.Stream),
svc.Mux(mux),
svc.Store(options.Store),
svc.Config(options.Config),