Vault proxy supporting code (#2415)

* Vault proxy supporting methods
This commit is contained in:
Irena Rindos authored and GitHub committed 2022-08-31 12:40:35 -04:00
1 parent 3f70644978
commit db21ead31c
11 files changed
+106 -86

No files matched your search

+7
View File
@@ -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