Documentation ¶
Index ¶
- type InMemoryDatastore
- func (d *InMemoryDatastore) AddEvent(ctx context.Context, jobID string, ev model.JobEvent) error
- func (d *InMemoryDatastore) AddJob(ctx context.Context, j *model.Job) error
- func (d *InMemoryDatastore) AddLocalEvent(ctx context.Context, jobID string, ev model.JobLocalEvent) error
- func (d *InMemoryDatastore) GetJob(ctx context.Context, id string) (*model.Job, error)
- func (d *InMemoryDatastore) GetJobEvents(ctx context.Context, id string) ([]model.JobEvent, error)
- func (d *InMemoryDatastore) GetJobLocalEvents(ctx context.Context, id string) ([]model.JobLocalEvent, error)
- func (d *InMemoryDatastore) GetJobState(ctx context.Context, jobID string) (model.JobState, error)
- func (d *InMemoryDatastore) GetJobs(ctx context.Context, query localdb.JobQuery) ([]*model.Job, error)
- func (d *InMemoryDatastore) GetJobsCount(ctx context.Context, query localdb.JobQuery) (int, error)
- func (d *InMemoryDatastore) HasLocalEvent(ctx context.Context, jobID string, eventFilter localdb.LocalEventFilter) (bool, error)
- func (d *InMemoryDatastore) UpdateJobDeal(ctx context.Context, jobID string, deal model.Deal) error
- func (d *InMemoryDatastore) UpdateShardState(ctx context.Context, jobID, nodeID string, shardIndex int, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryDatastore ¶
type InMemoryDatastore struct {
// contains filtered or unexported fields
}
func NewInMemoryDatastore ¶
func NewInMemoryDatastore() (*InMemoryDatastore, error)
func (*InMemoryDatastore) AddLocalEvent ¶
func (d *InMemoryDatastore) AddLocalEvent(ctx context.Context, jobID string, ev model.JobLocalEvent) error
func (*InMemoryDatastore) GetJob ¶
Gets a job from the datastore.
Errors:
- error-job-not-found -- if the job is not found
func (*InMemoryDatastore) GetJobEvents ¶
Get Job Events from a job ID
Errors:
- error-job-not-found -- if the job is not found
func (*InMemoryDatastore) GetJobLocalEvents ¶
func (d *InMemoryDatastore) GetJobLocalEvents(ctx context.Context, id string) ([]model.JobLocalEvent, error)
func (*InMemoryDatastore) GetJobState ¶
func (*InMemoryDatastore) GetJobsCount ¶
func (*InMemoryDatastore) HasLocalEvent ¶
func (d *InMemoryDatastore) HasLocalEvent(ctx context.Context, jobID string, eventFilter localdb.LocalEventFilter) (bool, error)
func (*InMemoryDatastore) UpdateJobDeal ¶
func (*InMemoryDatastore) UpdateShardState ¶
func (d *InMemoryDatastore) UpdateShardState( ctx context.Context, jobID, nodeID string, shardIndex int, update model.JobShardState, ) error
Click to show internal directories.
Click to hide internal directories.