Documentation
¶
Overview ¶
Package childstore wraps the session store the engine publishes child sessions to (subagents, parallel branches, and team members), so the host admits each child after it is persisted and before it runs. mecak8s uses it to register each helper agent with the identity broker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(store port.SessionStore, admitter Admitter) port.SessionStore
New wraps store so that each child session the engine publishes to it, or resumes from it, is admitted by admitter. It forwards what the engine uses on a child store (Save, Load, create-only publication, and the wrapped store's create support) and nothing else, which it reports as unsupported; see port.ChildSessionCreator.
Types ¶
type Admitter ¶
type Admitter interface {
// AdmitChild admits a child the engine is publishing for the first time.
AdmitChild(ctx context.Context, sess *session.Session, child port.ChildSessionInfo) error
// AdmitResumedChild admits a child the engine is resuming.
AdmitResumedChild(ctx context.Context, sess *session.Session, child port.ChildSessionInfo) error
}
Admitter admits the child sessions the engine publishes and resumes. An error stops the child before it runs.