storageregistry

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: 15 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 dependency manifold that runs the storage registry worker.

func NewTrackedWorker

func NewTrackedWorker(reg storage.ProviderRegistry) (worker.Worker, error)

NewTrackedWorker creates a new tracked worker for a storage provider registry.

func NewWorker

func NewWorker(cfg WorkerConfig) (*storageRegistryWorker, error)

NewWorker creates a new object store worker.

Types

type ManifoldConfig

type ManifoldConfig struct {
	ProviderFactoryName      string
	NewStorageRegistryWorker StorageRegistryWorkerFunc
	Clock                    clock.Clock
	Logger                   logger.Logger
}

ManifoldConfig defines the configuration for the storage registry manifold.

func (ManifoldConfig) Validate

func (cfg ManifoldConfig) Validate() error

Validate validates the manifold configuration.

type StorageRegistryWorker

type StorageRegistryWorker interface {
	storage.ProviderRegistry
	worker.Worker
}

StorageRegistryWorker is the interface for the storage registry worker.

type StorageRegistryWorkerFunc

type StorageRegistryWorkerFunc func(storage.ProviderRegistry) (worker.Worker, error)

StorageRegistryWorkerFunc is the function signature for creating a new storage registry worker.

type WorkerConfig

type WorkerConfig struct {
	// ProviderFactory is used to get provider instances.
	ProviderFactory          providertracker.ProviderFactory
	NewStorageRegistryWorker StorageRegistryWorkerFunc
	Clock                    clock.Clock
	Logger                   logger.Logger
}

WorkerConfig encapsulates the configuration options for the storage registry worker.

func (*WorkerConfig) Validate

func (c *WorkerConfig) Validate() error

Validate ensures that the config values are valid.

Jump to

Keyboard shortcuts

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