Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Filter ¶
type Filter struct { IDs []string Statuses []mapreduce.TaskStatus Limit *uint32 Offset *uint32 OrderBy *OrderField OrderDirection *OrderDirection InProgressFor *time.Duration }
type OrderDirection ¶
type OrderDirection int
const ( Ascending OrderDirection = iota Descending )
func (OrderDirection) String ¶
func (od OrderDirection) String() string
type OrderField ¶
type OrderField int
const (
OrderByCreatedAt OrderField = iota
)
func (OrderField) String ¶
func (of OrderField) String() string
type Tasks ¶
type Tasks interface { Transaction CreateMapTask(ctx context.Context, task mapreduce.MapTask) error CreateReduceTask(ctx context.Context, task mapreduce.ReduceTask) error UpdateMapTask(ctx context.Context, task mapreduce.MapTask) error UpdateReduceTask(ctx context.Context, task mapreduce.ReduceTask) error UpdateMapTasks(ctx context.Context, ids []string, fields UpdateFields) error UpdateReduceTasks(ctx context.Context, ids []string, fields UpdateFields) error GetMapTask(ctx context.Context, id string) (mapreduce.MapTask, error) GetReduceTask(ctx context.Context, id string) (mapreduce.ReduceTask, error) QueryMapTasks(ctx context.Context, filter Filter) ([]mapreduce.MapTask, error) QueryReduceTasks(ctx context.Context, filter Filter) ([]mapreduce.ReduceTask, error) }
func NewTestMongoDBTasksRepository ¶
func NewTestMongoDBTasksRepository(t *testing.T) (Tasks, *mongodb.MongoDBContainer)
type Transaction ¶
type UpdateFields ¶
type UpdateFields struct { Status *mapreduce.TaskStatus RescheduledAt *time.Time }
type UpdateFieldsMatcher ¶
type UpdateFieldsMatcher struct {
UpdateFields
}
func (UpdateFieldsMatcher) Matches ¶
func (m UpdateFieldsMatcher) Matches(x interface{}) bool
func (UpdateFieldsMatcher) String ¶
func (m UpdateFieldsMatcher) String() string
Click to show internal directories.
Click to hide internal directories.