providerservicefactory

package
v0.0.0-...-0db00f2 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 dependency.Manifold that will run an provider service.

func NewProviderServices

func NewProviderServices(
	modelUUID coremodel.UUID,
	dbGetter changestream.WatchableDBGetter,
	logger logger.Logger,
) services.ProviderServices

NewProviderServices returns a new provider domain services.

func NewProviderServicesGetter

func NewProviderServicesGetter(
	newProviderServices ProviderServicesFn,
	dbGetter changestream.WatchableDBGetter,
	logger logger.Logger,
) services.ProviderServicesGetter

NewProviderServicesGetter returns a new domain services getter.

func NewWorker

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

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

Types

type Config

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

	Logger logger.Logger

	NewProviderServicesGetter ProviderServicesGetterFn
	NewProviderServices       ProviderServicesFn
}

Config is the configuration required for domain services worker.

func (Config) Validate

func (config Config) Validate() error

Validate validates the domain services configuration.

type ManifoldConfig

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

	// NewProviderServicesGetter returns a new provider domain services
	// getter, to select a provider domain services per model UUID.
	NewProviderServicesGetter ProviderServicesGetterFn

	// NewProviderServices returns a new provider domain services for
	// the given model UUID.
	NewProviderServices ProviderServicesFn
}

ManifoldConfig holds the information necessary to run a provider service factory worker in a dependency.Engine.

func (ManifoldConfig) Validate

func (config ManifoldConfig) Validate() error

Validate validates the manifold configuration.

type ProviderServicesFn

ProviderServicesFn is a function that returns a provider service factory.

type ProviderServicesGetterFn

ProviderServicesGetterFn is a function that returns a provider service factory getter.

Jump to

Keyboard shortcuts

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