manager

package
v0.0.0-...-0174093 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependencySpec

type DependencySpec struct {
	Name string
	Data any
}

type Manager

type Manager struct {
	System       system.AbstractSystem
	Dependencies dependency.Manager
	TaskToGroup  TaskToGroup
	Resolvers    map[string]Resolver
	Logger       *slog.Logger
}

func (*Manager) Ready

func (manager *Manager) Ready(ctx context.Context) (tasks <-chan string, err error)

func (*Manager) Register

func (manager *Manager) Register(ctx context.Context, id string) error

type Resolver

type Resolver interface {
	Bind(ctx context.Context, id string, data any) error
	Ready(ctx context.Context) (<-chan string, error)
}

type TaskToGroup

type TaskToGroup interface {
	Save(ctx context.Context, task string, group string) error
	TaskByGroup(ctx context.Context, group string) (task string, err error)
	GroupByTask(ctx context.Context, task string) (group string, err error)
}

Directories

Path Synopsis
resolvers

Jump to

Keyboard shortcuts

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