Documentation
¶
Index ¶
- Variables
- type LadybugStore
- func (store *LadybugStore) CreateChainRun(ctx context.Context, run projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
- func (store *LadybugStore) DeleteChainRun(ctx context.Context, projectID, chainRunID string) error
- func (store *LadybugStore) FindChainRunByWorkPlan(ctx context.Context, projectID, workPlanID string) (projectworkflowchain.ChainRun, error)
- func (store *LadybugStore) GetChainRun(ctx context.Context, projectID, chainRunID string) (projectworkflowchain.ChainRun, error)
- func (store *LadybugStore) ListChainRuns(ctx context.Context, filter projectworkflowchain.ChainFilter) ([]projectworkflowchain.ChainRun, error)
- func (store *LadybugStore) UpdateChainRun(ctx context.Context, run projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
- type MemoryStore
- func (store *MemoryStore) CreateChainRun(_ context.Context, run projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
- func (store *MemoryStore) DeleteChainRun(_ context.Context, projectID, chainRunID string) error
- func (store *MemoryStore) FindChainRunByWorkPlan(_ context.Context, projectID, workPlanID string) (projectworkflowchain.ChainRun, error)
- func (store *MemoryStore) GetChainRun(_ context.Context, projectID, chainRunID string) (projectworkflowchain.ChainRun, error)
- func (store *MemoryStore) ListChainRuns(_ context.Context, filter projectworkflowchain.ChainFilter) ([]projectworkflowchain.ChainRun, error)
- func (store *MemoryStore) UpdateChainRun(_ context.Context, run projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicate = errors.New("project workflow chain resource already exists")
View Source
var ErrNotFound = errors.New("project workflow chain resource not found")
Functions ¶
This section is empty.
Types ¶
type LadybugStore ¶
type LadybugStore struct {
// contains filtered or unexported fields
}
func NewLadybugStore ¶
func NewLadybugStore(graph ladybug.Graph) *LadybugStore
func (*LadybugStore) CreateChainRun ¶
func (store *LadybugStore) CreateChainRun(ctx context.Context, run projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
func (*LadybugStore) DeleteChainRun ¶ added in v0.3.0
func (store *LadybugStore) DeleteChainRun(ctx context.Context, projectID, chainRunID string) error
DeleteChainRun permanently removes the chain run node for the given project + run id. A run belonging to a different project is not matched (the node's project_id property is part of the delete filter). Deleting an absent run is a no-op because DeleteNodes matches zero nodes. The scoped-by-project guard runs BEFORE the delete so a cross-project caller can never remove another project's node even if ids collided.
func (*LadybugStore) FindChainRunByWorkPlan ¶
func (store *LadybugStore) FindChainRunByWorkPlan(ctx context.Context, projectID, workPlanID string) (projectworkflowchain.ChainRun, error)
func (*LadybugStore) GetChainRun ¶
func (store *LadybugStore) GetChainRun(ctx context.Context, projectID, chainRunID string) (projectworkflowchain.ChainRun, error)
func (*LadybugStore) ListChainRuns ¶
func (store *LadybugStore) ListChainRuns(ctx context.Context, filter projectworkflowchain.ChainFilter) ([]projectworkflowchain.ChainRun, error)
func (*LadybugStore) UpdateChainRun ¶
func (store *LadybugStore) UpdateChainRun(ctx context.Context, run projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
func (*MemoryStore) CreateChainRun ¶
func (store *MemoryStore) CreateChainRun(_ context.Context, run projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
func (*MemoryStore) DeleteChainRun ¶ added in v0.3.0
func (store *MemoryStore) DeleteChainRun(_ context.Context, projectID, chainRunID string) error
DeleteChainRun permanently removes the chain run and its plan-id index entries. Scoped by project: a run under a different project is not removed. Idempotent: deleting an absent run is a no-op.
func (*MemoryStore) FindChainRunByWorkPlan ¶
func (store *MemoryStore) FindChainRunByWorkPlan(_ context.Context, projectID, workPlanID string) (projectworkflowchain.ChainRun, error)
func (*MemoryStore) GetChainRun ¶
func (store *MemoryStore) GetChainRun(_ context.Context, projectID, chainRunID string) (projectworkflowchain.ChainRun, error)
func (*MemoryStore) ListChainRuns ¶
func (store *MemoryStore) ListChainRuns(_ context.Context, filter projectworkflowchain.ChainFilter) ([]projectworkflowchain.ChainRun, error)
func (*MemoryStore) UpdateChainRun ¶
func (store *MemoryStore) UpdateChainRun(_ context.Context, run projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
type Store ¶
type Store interface {
CreateChainRun(context.Context, projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
GetChainRun(context.Context, string, string) (projectworkflowchain.ChainRun, error)
ListChainRuns(context.Context, projectworkflowchain.ChainFilter) ([]projectworkflowchain.ChainRun, error)
UpdateChainRun(context.Context, projectworkflowchain.ChainRun) (projectworkflowchain.ChainRun, error)
FindChainRunByWorkPlan(context.Context, string, string) (projectworkflowchain.ChainRun, error)
// DeleteChainRun permanently removes a chain run node. It is scoped to the
// supplied project: a run belonging to a different project is not removed.
// Deleting an already-absent run is a safe no-op (nil error) so the call is
// idempotent under retries.
DeleteChainRun(context.Context, string, string) error
}
Click to show internal directories.
Click to hide internal directories.