manager

package
v0.0.0-...-75be81d Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 8 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       core.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