Documentation
¶
Index ¶
- type Datastore
- func (ds *Datastore) CountTasksByJobID(ctx context.Context, jobID string) (int, error)
- func (ds *Datastore) CreateJob(ctx context.Context, job *domain.Job) error
- func (ds *Datastore) GetJob(ctx context.Context, jobID string) (*domain.Job, error)
- func (ds *Datastore) GetJobTasks(ctx context.Context, jobID string, limit, offset int) ([]*domain.Task, int, error)
- func (ds *Datastore) GetJobs(ctx context.Context, limit, offset int) ([]*domain.Job, int, error)
- func (ds *Datastore) GetJobsByConfigAndState(ctx context.Context, jc *domain.JobConfig, states []domain.JobState, ...) ([]*domain.Job, error)
- type MongoDB
- type Storer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore struct {
Backend Storer
}
Datastore provides a datastore.Storer interface used to store, retrieve, remove or update bundles
func (*Datastore) CountTasksByJobID ¶ added in v0.11.0
CountTasksByJobID returns the total count of tasks for a job.
func (*Datastore) GetJobTasks ¶ added in v0.11.0
func (ds *Datastore) GetJobTasks(ctx context.Context, jobID string, limit, offset int) ([]*domain.Task, int, error)
GetJobTasks retrieves a list of migration tasks for a job with pagination.
func (*Datastore) GetJobs ¶ added in v0.10.0
GetJobs retrieves a list of migration jobs with pagination.
func (*Datastore) GetJobsByConfigAndState ¶ added in v0.7.0
func (ds *Datastore) GetJobsByConfigAndState(ctx context.Context, jc *domain.JobConfig, states []domain.JobState, limit, offset int) ([]*domain.Job, error)
GetJobsByConfigAndState retrieves jobs based on the provided job configuration and states.
type MongoDB ¶
type MongoDB interface {
Close(context.Context) error
Checker(context.Context, *healthcheck.CheckState) error
// contains filtered or unexported methods
}
MongoDB represents all the required methods from mongoDB
Click to show internal directories.
Click to hide internal directories.