Documentation ¶
Index ¶
- Constants
- Variables
- func CloseStoragesForContext(ctx context.Context, opts ...ResolveOption) error
- func DSNtoContextDAO(ctx context.Context, dsn []string, daoFunc any) (context.Context, error)
- func MockServicesToContextDAO(ctx context.Context, dsn map[string]string, ...) (context.Context, error)
- func MustGetConfig(ctx context.Context) config.Store
- func Resolve[T any](ctx context.Context, opts ...ResolveOption) (s T, final error)
- func StorageMigration(opts ...ResolveOption) func(ctx2 context.Context) error
- type Bootstrap
- type InitProvider
- type Manager
- type ResolveOption
- type ResolveOptions
- type Viper
Constants ¶
View Source
const ( CommandStart = "start" CommandStop = "stop" CommandRestart = "restart" )
Variables ¶
View Source
var ContextKey = managerKey{}
Functions ¶
func CloseStoragesForContext ¶
func CloseStoragesForContext(ctx context.Context, opts ...ResolveOption) error
func DSNtoContextDAO ¶
func StorageMigration ¶
func StorageMigration(opts ...ResolveOption) func(ctx2 context.Context) error
StorageMigration produces a function for Resolving a storage.Migrator and apply its Migrate function
Types ¶
type Bootstrap ¶
Bootstrap wraps a config.Store and is loaded from yaml templates or additional environment data
func (*Bootstrap) RegisterTemplate ¶
RegisterTemplate adds a new template to the list
type InitProvider ¶
type Manager ¶
type Manager interface { Context() context.Context Registry() registry.Registry ServeAll(...server.ServeOption) error StopAll() SetServeOptions(...server.ServeOption) WatchServicesConfigs() WatchBroker(ctx context.Context, br broker.Broker) error RegisterBootstrapTemplate(typ string, data string) error RegisterStorage(scheme string, options ...controller.Option[storage.Storage]) RegisterConfig(scheme string, config ...controller.Option[*openurl.Pool[config.Store]]) RegisterQueue(scheme string, opts ...controller.Option[broker.AsyncQueuePool]) RegisterCache(scheme string, opts ...controller.Option[*openurl.Pool[cache.Cache]]) GetRootID() string GetStorage(ctx context.Context, name string, out any) error GetQueue(ctx context.Context, name string, resolutionData map[string]interface{}, openerID string, openerFunc broker.OpenWrapper) (broker.AsyncQueue, func() (bool, error), error) GetQueuePool(name string) (broker.AsyncQueuePool, error) GetCache(ctx context.Context, name string, resolutionData map[string]interface{}) (cache.Cache, error) }
type ResolveOption ¶
type ResolveOption func(*ResolveOptions)
func WithCleanBeforeClose ¶
func WithCleanBeforeClose() ResolveOption
func WithName ¶
func WithName(name string) ResolveOption
type ResolveOptions ¶
Click to show internal directories.
Click to hide internal directories.