units3caller

package
v0.0.0-...-b9bb202 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

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(url string, client s3client.HTTPClient, logger logger.Logger) (objectstore.ReadSession, error)

NewS3Client returns a new S3 client based on the supplied dependencies. This only provides a read only session to the object store. As this is intended to be used by the unit, there is never an expectation that the unit will write to the object store.

Types

type ManifoldConfig

type ManifoldConfig struct {
	// APICallerName is the name of the APICaller resource that
	// supplies the API connection.
	APICallerName string

	// NewClient is used to create a new object store client.
	NewClient func(string, s3client.HTTPClient, logger.Logger) (objectstore.ReadSession, error)

	// Logger is used to write logging statements for the worker.
	Logger logger.Logger
}

ManifoldConfig defines a Manifold's dependencies.

func (ManifoldConfig) Validate

func (cfg ManifoldConfig) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL