Documentation ¶
Index ¶
- func LoadRoutine(grpcDriver *GRPCDriver, number int, channel chan bool)
- type GRPCDriver
- func (g GRPCDriver) Complete(queueID, taskID string) *pb.StatusMessage
- func (g GRPCDriver) DeleteQueue(queueID string) (*pb.StatusMessage, error)
- func (g GRPCDriver) Fail(queueID, taskID string) *pb.StatusMessage
- func (g GRPCDriver) GetHealth() (status pb.StatusMessage, err error)
- func (g GRPCDriver) HeartBeat(queueID, taskID string, expirationSec int32) *pb.StatusMessage
- func (g GRPCDriver) ListQueues() (queues map[string]*pb.QueueProgress, err error)
- func (g GRPCDriver) LoadTask(ctx context.Context, queueID string) (task *pb.Task, err error)
- func (g GRPCDriver) Peek(queueID, phase string, limit int32) (taskList *pb.TaskList, err error)
- func (g GRPCDriver) Progress(queueID string) (progress *pb.QueueProgress, err error)
- func (g GRPCDriver) PushTask(task *pb.Task) (*pb.StatusMessage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadRoutine ¶
func LoadRoutine(grpcDriver *GRPCDriver, number int, channel chan bool)
LoadRoutine is not a test on its own.
Types ¶
type GRPCDriver ¶
type GRPCDriver struct { Connection *grpc.ClientConn // contains filtered or unexported fields }
GRPCDriver is the main instance
func NewGRPCDriver ¶
func NewGRPCDriver() *GRPCDriver
NewGRPCDriver creates and initializes a new GRPC client and connection
func (GRPCDriver) Complete ¶
func (g GRPCDriver) Complete(queueID, taskID string) *pb.StatusMessage
Complete moves the task from the running set to the completed set
func (GRPCDriver) DeleteQueue ¶ added in v0.5.4
func (g GRPCDriver) DeleteQueue(queueID string) (*pb.StatusMessage, error)
DeleteQueue deletes a queue
func (GRPCDriver) Fail ¶ added in v0.4.2
func (g GRPCDriver) Fail(queueID, taskID string) *pb.StatusMessage
Fail marks the task as failed by pushing it to the failed set
func (GRPCDriver) GetHealth ¶
func (g GRPCDriver) GetHealth() (status pb.StatusMessage, err error)
GetHealth just checks if everything, including Redis is healthy
func (GRPCDriver) HeartBeat ¶
func (g GRPCDriver) HeartBeat(queueID, taskID string, expirationSec int32) *pb.StatusMessage
HeartBeat updates the expiry of an item on the running set ToDo: add a timeout, for testing
func (GRPCDriver) ListQueues ¶ added in v0.4.2
func (g GRPCDriver) ListQueues() (queues map[string]*pb.QueueProgress, err error)
ListQueues returns a list of Progress structs
func (GRPCDriver) Progress ¶
func (g GRPCDriver) Progress(queueID string) (progress *pb.QueueProgress, err error)
Progress gets the status for a queue
func (GRPCDriver) PushTask ¶
func (g GRPCDriver) PushTask(task *pb.Task) (*pb.StatusMessage, error)
PushTask pushes a task onto the queue
Click to show internal directories.
Click to hide internal directories.