Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTaskContractAlreadyOwned = errors.New("task_contract_already_owned") ErrGraphContractMismatch = errors.New("graph_contract_mismatch") ErrGraphNotFound = errors.New("graph_not_found") ErrTaskContractNotFound = errors.New("task_contract_not_found") ErrRunNotFound = errors.New("run_not_found") ErrAttemptNotFound = errors.New("attempt_not_found") ErrArtifactNotFound = errors.New("artifact_not_found") ErrExecutionBindingMissing = errors.New("execution_binding_missing") )
Functions ¶
This section is empty.
Types ¶
type PublishPackageParams ¶
type PublishPackageParams struct {
Package string
Contracts []PublishTaskContractParams
Graphs []RegisterGraphParams
}
type PublishPackageResult ¶
type PublishTaskContractParams ¶
type PublishTaskContractParams struct {
Task string
OwnerPackage string
InputSchema json.RawMessage
OutputSchema json.RawMessage
}
type RegisterGraphParams ¶
type Store ¶
type Store interface {
PublishTaskContract(context.Context, PublishTaskContractParams) (model.TaskContract, error)
LoadTaskContract(context.Context, string, string) (model.TaskContract, error)
LoadTaskContractHead(context.Context, string) (model.TaskContractHead, error)
ListTaskContractHeadsByOwner(context.Context, string) ([]model.TaskContractHead, error)
RegisterGraph(context.Context, RegisterGraphParams) (model.GraphDefinition, error)
PublishPackage(context.Context, PublishPackageParams) (PublishPackageResult, error)
LoadGraph(context.Context, string) (model.GraphDefinition, error)
LoadGraphHead(context.Context, string) (string, error)
CreateRunForGraph(context.Context, string, json.RawMessage) (model.RunRecord, error)
LoadRunRecord(context.Context, string) (model.RunRecord, error)
ListActiveRunIDs(context.Context) ([]string, error)
ClaimAttempt(context.Context, string, string, time.Time, time.Time) (model.Attempt, bool, error)
LoadAttempt(context.Context, string) (model.Attempt, error)
RenewAttempt(context.Context, string, time.Time) (bool, error)
ListAttempts(context.Context, string, *string) ([]model.Attempt, error)
RetryNode(context.Context, string, string) (bool, error)
CommitSuccess(context.Context, string, string, string, time.Time, json.RawMessage) (bool, error)
CommitFailure(context.Context, string, string, string, time.Time, string) (bool, error)
CommitRetry(context.Context, string, string, string, time.Time, string, int, time.Time) (bool, error)
SaveExecutionBinding(context.Context, model.ExecutionBinding) (model.ExecutionBinding, error)
LoadExecutionBinding(context.Context, string, string) (model.ExecutionBinding, error)
DeleteExecutionBinding(context.Context, string, string) (bool, error)
ListArtifacts(context.Context, string) ([]model.ArtifactRecord, error)
AcknowledgeArtifactReleased(context.Context, string, time.Time) (model.ArtifactRecord, error)
Close() error
}
type StoreProvider ¶
type StoreProvider interface {
DefaultStore(context.Context) (Store, error)
ForTenant(context.Context, TenantID) (Store, error)
Close() error
}
StoreProvider resolves one tenant-scoped Store for each request. Providers must reject an empty tenant rather than falling back to another tenant.
Click to show internal directories.
Click to hide internal directories.