Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DAO ¶
type DAO interface {
Save(ctx context.Context, g *Group) error
Load(ctx context.Context, id string) (*Group, error)
Delete(ctx context.Context, id string) error
List(ctx context.Context) ([]*Group, error)
}
DAO abstracts persistence operations for correlation groups so that the allocator can recover its in-memory state after a restart.
type Group ¶
type Group struct {
ID string
ParentProcessID string
ParentExecID string
Expected int
Outputs []interface{}
DoneAt *time.Time
TimeoutAt *time.Time // nil means no timeout
Mode string
Merge string
// contains filtered or unexported fields
}
Group represents a rendez-vous for a set of asynchronous executions emitted by a parent task. The group tracks how many children were expected and how many have already reported completion.
func (*Group) AggregateOutputs ¶
func (g *Group) AggregateOutputs() []interface{}
AggregateOutputs returns slice of collected child outputs.
type MemoryDAO ¶
type MemoryDAO struct {
// contains filtered or unexported fields
}
MemoryDAO stores correlation groups purely in memory; useful for unit tests and single-instance deployments.
func NewMemoryDAO ¶
func NewMemoryDAO() *MemoryDAO
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an in-memory implementation satisfying basic operations needed by the allocator/processor communication. It can be replaced by a Redis or DB implementation later without changing callers.