objectstoreservices

package
v0.0.0-...-756137a Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 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 dependency.Manifold that will run an object store service.

func NewObjectStoreServices

func NewObjectStoreServices(
	modelUUID coremodel.UUID,
	dbGetter changestream.WatchableDBGetter,
	logger logger.Logger,
) services.ObjectStoreServices

NewObjectStoreServices returns a new object store services.

func NewObjectStoreServicesGetter

func NewObjectStoreServicesGetter(
	newObjectStoreServices ObjectStoreServicesFn,
	dbGetter changestream.WatchableDBGetter,
	logger logger.Logger,
) services.ObjectStoreServicesGetter

NewObjectStoreServicesGetter returns a new object store services getter.

func NewWorker

func NewWorker(config Config) (worker.Worker, error)

NewWorker returns a new services worker, with the given configuration.

Types

type Config

type Config struct {
	// DBGetter supplies WatchableDB implementations by namespace.
	DBGetter changestream.WatchableDBGetter

	Logger logger.Logger

	NewObjectStoreServicesGetter ObjectStoreServicesGetterFn
	NewObjectStoreServices       ObjectStoreServicesFn
}

Config is the configuration required for services worker.

func (Config) Validate

func (config Config) Validate() error

Validate validates the services configuration.

type ManifoldConfig

type ManifoldConfig struct {
	ChangeStreamName string
	Logger           logger.Logger
	NewWorker        func(Config) (worker.Worker, error)

	// NewObjectStoreServicesGetter returns a new object store services
	// getter, to select a object store services per model UUID.
	NewObjectStoreServicesGetter ObjectStoreServicesGetterFn

	// NewObjectStoreServices returns a new object store services for
	// the given model UUID.
	NewObjectStoreServices ObjectStoreServicesFn
}

ManifoldConfig holds the information necessary to run a object store services worker in a dependency.Engine.

func (ManifoldConfig) Validate

func (config ManifoldConfig) Validate() error

Validate validates the manifold configuration.

type ObjectStoreServicesFn

ObjectStoreServicesFn is a function that returns a object store services.

type ObjectStoreServicesGetterFn

ObjectStoreServicesGetterFn is a function that returns a object store services getter.

Jump to

Keyboard shortcuts

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