Documentation ¶
Index ¶
- func Manifold(config ManifoldConfig) dependency.Manifold
- func NewS3Client(endpoint string, client s3client.HTTPClient, creds s3client.Credentials, ...) (objectstore.Session, error)
- func NewWorker(config workerConfig) (worker.Worker, error)
- type ControllerConfigService
- type GetControllerConfigServiceFunc
- type ManifoldConfig
- type NewClientFunc
- type NewWorkerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a manifold whose worker wraps an S3 Session.
func NewS3Client ¶
func NewS3Client(endpoint string, client s3client.HTTPClient, creds s3client.Credentials, logger logger.Logger) (objectstore.Session, error)
NewS3Client returns a new S3 client based on the supplied dependencies.
Types ¶
type ControllerConfigService ¶
type ControllerConfigService interface { // ControllerConfig returns the current controller configuration. ControllerConfig(context.Context) (controller.Config, error) // WatchControllerConfig returns a watcher that returns keys for any changes // to controller config. WatchControllerConfig() (watcher.StringsWatcher, error) }
ControllerConfigService is the interface that the worker uses to get the controller configuration.
func GetControllerConfigService ¶
func GetControllerConfigService(getter dependency.Getter, name string) (ControllerConfigService, error)
GetControllerConfigService is a helper function that gets a service from the manifold.
type GetControllerConfigServiceFunc ¶
type GetControllerConfigServiceFunc = func(getter dependency.Getter, name string) (ControllerConfigService, error)
GetControllerConfigServiceFunc is a helper function that gets a service from the manifold.
type ManifoldConfig ¶
type ManifoldConfig struct { HTTPClientName string ObjectStoreServicesName string // NewClient is used to create a new object store client. NewClient NewClientFunc // Logger is used to write logging statements for the worker. Logger logger.Logger // Clock is used for the retry mechanism. Clock clock.Clock // GetControllerConfigService is used to get a service from the manifold. GetControllerConfigService GetControllerConfigServiceFunc NewWorker NewWorkerFunc }
ManifoldConfig defines a Manifold's dependencies.
func (ManifoldConfig) Validate ¶
func (cfg ManifoldConfig) Validate() error
type NewClientFunc ¶
type NewClientFunc = func(endpoint string, client s3client.HTTPClient, creds s3client.Credentials, logger logger.Logger) (objectstore.Session, error)
NewClientFunc is a function that returns a new S3 client.
type NewWorkerFunc ¶
type NewWorkerFunc = func(workerConfig) (worker.Worker, error)
NewWorkerFunc is a function that returns a new worker.
Click to show internal directories.
Click to hide internal directories.