Documentation
¶
Index ¶
- func NewFileDAGRepository(baseDir string, options ...filedag.Option) *persis.DAGRepository
- func NewFileDAGRunRepository(baseDir string, options persis.DAGRunRepositoryOptions, ...) *persis.DAGRunRepository
- func StartContextRunner(t *testing.T, runner ContextRunner) func()
- type ContextRunner
- type DAGRunStoreStub
- func (DAGRunStoreStub) CompareAndSwapLatestAttemptStatus(context.Context, persis.DAGRunCompareAndSwapStatusRequest) (*ir.DAGRunStatus, bool, error)
- func (DAGRunStoreStub) CreateAttempt(context.Context, persis.DAGRunCreateAttemptRequest) (dagrun.Attempt, error)
- func (DAGRunStoreStub) FindAttempt(context.Context, ir.DAGRunRef) (dagrun.Attempt, error)
- func (DAGRunStoreStub) FindSubAttempt(context.Context, ir.DAGRunRef, string) (dagrun.Attempt, error)
- func (DAGRunStoreStub) LatestAttempt(context.Context, persis.DAGRunLatestAttemptQuery) (dagrun.Attempt, error)
- func (DAGRunStoreStub) LatestStatuses(context.Context, persis.DAGRunLatestStatusesQuery) ([]*ir.DAGRunStatus, error)
- func (DAGRunStoreStub) OpenLog(context.Context, string) (io.ReadCloser, error)
- func (DAGRunStoreStub) PruneArtifacts(context.Context, persis.ArtifactPruneRequest) (*persis.ArtifactPruneResult, error)
- func (DAGRunStoreStub) QueryStatuses(context.Context, persis.DAGRunStatusQuery) (persis.DAGRunStatusPage, error)
- func (DAGRunStoreStub) RecentStatuses(context.Context, string, int) ([]ir.DAGRunStatus, error)
- func (DAGRunStoreStub) RemoveDAGRun(context.Context, persis.DAGRunRemoveRequest) error
- func (DAGRunStoreStub) RemoveOldDAGRuns(context.Context, persis.DAGRunRetentionRequest) ([]ir.DAGRunRef, error)
- type MockAttempt
- func (m *MockAttempt) Abort(ctx context.Context) error
- func (m *MockAttempt) Close(ctx context.Context) error
- func (m *MockAttempt) Hidden() bool
- func (m *MockAttempt) Hide(ctx context.Context) error
- func (m *MockAttempt) ID() string
- func (m *MockAttempt) IsAborting(ctx context.Context) (bool, error)
- func (m *MockAttempt) Open(ctx context.Context) error
- func (m *MockAttempt) ReadDAG(ctx context.Context) (*ir.DAG, error)
- func (m *MockAttempt) ReadOutputs(ctx context.Context) (*ir.DAGRunOutputs, error)
- func (m *MockAttempt) ReadStatus(ctx context.Context) (*ir.DAGRunStatus, error)
- func (m *MockAttempt) ReadStatusUncached(ctx context.Context) (*ir.DAGRunStatus, error)
- func (m *MockAttempt) ReadStepMessages(ctx context.Context, stepName string) ([]ir.LLMMessage, error)
- func (m *MockAttempt) SetDAG(dag *ir.DAG)
- func (m *MockAttempt) Write(ctx context.Context, status ir.DAGRunStatus) error
- func (m *MockAttempt) WriteOutputs(ctx context.Context, outputs *ir.DAGRunOutputs) error
- func (m *MockAttempt) WriteStepMessages(ctx context.Context, stepName string, messages []ir.LLMMessage) error
- type MockQueueStore
- func (m *MockQueueStore) All(ctx context.Context) ([]queue.QueuedItemData, error)
- func (m *MockQueueStore) DeleteByItemIDs(ctx context.Context, name string, itemIDs []string) (int, error)
- func (m *MockQueueStore) DequeueByDAGRunID(ctx context.Context, name string, run ir.DAGRunRef) ([]queue.QueuedItemData, error)
- func (m *MockQueueStore) Enqueue(ctx context.Context, name string, priority queue.QueuePriority, ...) error
- func (m *MockQueueStore) GetByItemID(ctx context.Context, name, itemID string) (queue.QueuedItemData, error)
- func (m *MockQueueStore) Len(ctx context.Context, name string) (int, error)
- func (m *MockQueueStore) List(ctx context.Context, name string) ([]queue.QueuedItemData, error)
- func (m *MockQueueStore) ListByDAGName(ctx context.Context, name, dagName string) ([]queue.QueuedItemData, error)
- func (m *MockQueueStore) ListCursor(ctx context.Context, name, cursor string, limit int) (pagination.CursorResult[queue.QueuedItemData], error)
- func (m *MockQueueStore) QueueList(ctx context.Context) ([]string, error)
- func (m *MockQueueStore) QueueWatcher(ctx context.Context) queue.QueueWatcher
- func (m *MockQueueStore) Revision(ctx context.Context, name string) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileDAGRepository ¶ added in v2.14.0
func NewFileDAGRepository(baseDir string, options ...filedag.Option) *persis.DAGRepository
NewFileDAGRepository constructs a file-backed DAG repository for tests.
func NewFileDAGRunRepository ¶ added in v2.14.0
func NewFileDAGRunRepository( baseDir string, options persis.DAGRunRepositoryOptions, storeOptions ...filedagrun.StoreOption, ) *persis.DAGRunRepository
NewFileDAGRunRepository constructs a file-backed repository for tests.
func StartContextRunner ¶
func StartContextRunner(t *testing.T, runner ContextRunner) func()
StartContextRunner starts a context-driven runner and returns a shutdown function that cancels the context and waits for the runner to exit.
Types ¶
type ContextRunner ¶
ContextRunner is a minimal interface for background services that are driven by a cancellable context.
type DAGRunStoreStub ¶ added in v2.14.0
type DAGRunStoreStub struct{}
DAGRunStoreStub fails when a test calls a store method it did not override.
func (DAGRunStoreStub) CompareAndSwapLatestAttemptStatus ¶ added in v2.14.0
func (DAGRunStoreStub) CompareAndSwapLatestAttemptStatus( context.Context, persis.DAGRunCompareAndSwapStatusRequest, ) (*ir.DAGRunStatus, bool, error)
func (DAGRunStoreStub) CreateAttempt ¶ added in v2.14.0
func (DAGRunStoreStub) CreateAttempt(context.Context, persis.DAGRunCreateAttemptRequest) (dagrun.Attempt, error)
func (DAGRunStoreStub) FindAttempt ¶ added in v2.14.0
func (DAGRunStoreStub) FindSubAttempt ¶ added in v2.14.0
func (DAGRunStoreStub) LatestAttempt ¶ added in v2.14.0
func (DAGRunStoreStub) LatestAttempt(context.Context, persis.DAGRunLatestAttemptQuery) (dagrun.Attempt, error)
func (DAGRunStoreStub) LatestStatuses ¶
func (DAGRunStoreStub) LatestStatuses(context.Context, persis.DAGRunLatestStatusesQuery) ([]*ir.DAGRunStatus, error)
func (DAGRunStoreStub) OpenLog ¶ added in v2.17.0
func (DAGRunStoreStub) OpenLog(context.Context, string) (io.ReadCloser, error)
func (DAGRunStoreStub) PruneArtifacts ¶ added in v2.18.2
func (DAGRunStoreStub) PruneArtifacts(context.Context, persis.ArtifactPruneRequest) (*persis.ArtifactPruneResult, error)
func (DAGRunStoreStub) QueryStatuses ¶ added in v2.14.0
func (DAGRunStoreStub) QueryStatuses(context.Context, persis.DAGRunStatusQuery) (persis.DAGRunStatusPage, error)
func (DAGRunStoreStub) RecentStatuses ¶ added in v2.14.0
func (DAGRunStoreStub) RecentStatuses(context.Context, string, int) ([]ir.DAGRunStatus, error)
func (DAGRunStoreStub) RemoveDAGRun ¶ added in v2.14.0
func (DAGRunStoreStub) RemoveDAGRun(context.Context, persis.DAGRunRemoveRequest) error
func (DAGRunStoreStub) RemoveOldDAGRuns ¶ added in v2.14.0
func (DAGRunStoreStub) RemoveOldDAGRuns(context.Context, persis.DAGRunRetentionRequest) ([]ir.DAGRunRef, error)
type MockAttempt ¶ added in v2.14.0
type MockAttempt struct {
mock.Mock
Status *ir.DAGRunStatus
}
MockAttempt is a configurable DAG-run attempt for tests.
func (*MockAttempt) Hidden ¶ added in v2.14.0
func (m *MockAttempt) Hidden() bool
func (*MockAttempt) ID ¶ added in v2.14.0
func (m *MockAttempt) ID() string
func (*MockAttempt) IsAborting ¶ added in v2.14.0
func (m *MockAttempt) IsAborting(ctx context.Context) (bool, error)
func (*MockAttempt) ReadOutputs ¶ added in v2.14.0
func (m *MockAttempt) ReadOutputs(ctx context.Context) (*ir.DAGRunOutputs, error)
func (*MockAttempt) ReadStatus ¶ added in v2.14.0
func (m *MockAttempt) ReadStatus(ctx context.Context) (*ir.DAGRunStatus, error)
func (*MockAttempt) ReadStatusUncached ¶ added in v2.15.3
func (m *MockAttempt) ReadStatusUncached(ctx context.Context) (*ir.DAGRunStatus, error)
func (*MockAttempt) ReadStepMessages ¶ added in v2.14.0
func (m *MockAttempt) ReadStepMessages(ctx context.Context, stepName string) ([]ir.LLMMessage, error)
func (*MockAttempt) SetDAG ¶ added in v2.14.0
func (m *MockAttempt) SetDAG(dag *ir.DAG)
func (*MockAttempt) Write ¶ added in v2.14.0
func (m *MockAttempt) Write(ctx context.Context, status ir.DAGRunStatus) error
func (*MockAttempt) WriteOutputs ¶ added in v2.14.0
func (m *MockAttempt) WriteOutputs(ctx context.Context, outputs *ir.DAGRunOutputs) error
func (*MockAttempt) WriteStepMessages ¶ added in v2.14.0
func (m *MockAttempt) WriteStepMessages(ctx context.Context, stepName string, messages []ir.LLMMessage) error
type MockQueueStore ¶ added in v2.13.0
MockQueueStore is a configurable queue store for tests.
func (*MockQueueStore) All ¶ added in v2.13.0
func (m *MockQueueStore) All(ctx context.Context) ([]queue.QueuedItemData, error)
func (*MockQueueStore) DeleteByItemIDs ¶ added in v2.13.0
func (*MockQueueStore) DequeueByDAGRunID ¶ added in v2.13.0
func (m *MockQueueStore) DequeueByDAGRunID(ctx context.Context, name string, run ir.DAGRunRef) ([]queue.QueuedItemData, error)
func (*MockQueueStore) Enqueue ¶ added in v2.13.0
func (m *MockQueueStore) Enqueue(ctx context.Context, name string, priority queue.QueuePriority, run ir.DAGRunRef) error
func (*MockQueueStore) GetByItemID ¶ added in v2.15.3
func (m *MockQueueStore) GetByItemID(ctx context.Context, name, itemID string) (queue.QueuedItemData, error)
func (*MockQueueStore) List ¶ added in v2.13.0
func (m *MockQueueStore) List(ctx context.Context, name string) ([]queue.QueuedItemData, error)
func (*MockQueueStore) ListByDAGName ¶ added in v2.13.0
func (m *MockQueueStore) ListByDAGName(ctx context.Context, name, dagName string) ([]queue.QueuedItemData, error)
func (*MockQueueStore) ListCursor ¶ added in v2.13.0
func (m *MockQueueStore) ListCursor(ctx context.Context, name, cursor string, limit int) (pagination.CursorResult[queue.QueuedItemData], error)
func (*MockQueueStore) QueueList ¶ added in v2.13.0
func (m *MockQueueStore) QueueList(ctx context.Context) ([]string, error)
func (*MockQueueStore) QueueWatcher ¶ added in v2.13.0
func (m *MockQueueStore) QueueWatcher(ctx context.Context) queue.QueueWatcher
Click to show internal directories.
Click to hide internal directories.