Documentation ¶
Index ¶
- Constants
- type Dependency
- type Doc
- type Group
- type Manager
- func (manager *Manager) InitializeGroup(ctx context.Context, groupId string, dependencyIds ...string) error
- func (manager *Manager) LoadDependencies(ctx context.Context, ids ...string) ([]dependency.Dependency, error)
- func (manager *Manager) LoadGroups(ctx context.Context, ids ...string) ([]dependency.Group, error)
- func (manager *Manager) LoadShallowGroups(ctx context.Context, ids ...string) ([]Group, error)
- func (manager *Manager) NewDependencies(ctx context.Context, n int) ([]dependency.Dependency, error)
- func (manager *Manager) NewGroup(ctx context.Context) (groupId string, err error)
- func (manager *Manager) ReadyGroups(ctx context.Context) (<-chan string, error)
- func (manager *Manager) Resolve(ctx context.Context, values ...dependency.Dependency) error
- type Set
Constants ¶
View Source
const ( DependencyKind = "dependency" GroupKind = "group" )
View Source
const ( GroupCreated = "created" GroupInitializing = "initializing" GroupInitialized = "initialized" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Manager ¶
type Manager struct { Collection *mongo.Collection Broker *event.Broker Logger *slog.Logger EventName string ConsumerGroup string }
Groups and Dependencies are stored in one collection and are differentiated by the 'kind' field.
func (*Manager) InitializeGroup ¶
func (*Manager) LoadDependencies ¶
func (manager *Manager) LoadDependencies(ctx context.Context, ids ...string) ([]dependency.Dependency, error)
func (*Manager) LoadGroups ¶
func (*Manager) LoadShallowGroups ¶
func (*Manager) NewDependencies ¶
func (manager *Manager) NewDependencies(ctx context.Context, n int) ([]dependency.Dependency, error)
func (*Manager) ReadyGroups ¶
func (*Manager) Resolve ¶
func (manager *Manager) Resolve(ctx context.Context, values ...dependency.Dependency) error
Click to show internal directories.
Click to hide internal directories.