1 parent
3f70644978
commit
db21ead31c
11 files changed
+106
-86
No files matched your search
@@ -72,6 +72,7 @@ var (
|
||||
|
||||
downstreamersFactory func(context.Context, string) (downstreamers, error)
|
||||
downstreamWorkersTickerFactory func(context.Context, string, downstreamers, downstreamRouter) (downstreamWorkersTicker, error)
|
||||
commandClientFactory func(context.Context, *Controller) error
|
||||
)
|
||||
|
||||
type Controller struct {
|
||||
@@ -361,6 +362,12 @@ func New(ctx context.Context, conf *Config) (*Controller, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to initialize downstream workers graph: %w", err)
|
||||
}
|
||||
if commandClientFactory != nil {
|
||||
err := commandClientFactory(ctx, c)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to initialize issue command factory: %w", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return c, nil
|
||||
|
||||
Reference in new issue
Block a user