Documentation ¶
Index ¶
- type Elastic
- func (es *Elastic) Close()
- func (es *Elastic) DeleteNode(ctx context.Context, node *scheduler.Node) (*scheduler.DeleteNodeResponse, error)
- func (es *Elastic) GetNode(ctx context.Context, req *scheduler.GetNodeRequest) (*scheduler.Node, error)
- func (es *Elastic) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes.Task, error)
- func (es *Elastic) Init() error
- func (es *Elastic) ListNodes(ctx context.Context, req *scheduler.ListNodesRequest) (*scheduler.ListNodesResponse, error)
- func (es *Elastic) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
- func (es *Elastic) PutNode(ctx context.Context, node *scheduler.Node) (*scheduler.PutNodeResponse, error)
- func (es *Elastic) ReadQueue(n int) []*tes.Task
- func (es *Elastic) WriteEvent(ctx context.Context, ev *events.Event) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Elastic ¶
type Elastic struct { scheduler.UnimplementedSchedulerServiceServer // contains filtered or unexported fields }
Elastic provides an elasticsearch database server backend.
func NewElastic ¶
NewElastic returns a new Elastic instance.
func (*Elastic) DeleteNode ¶
func (es *Elastic) DeleteNode(ctx context.Context, node *scheduler.Node) (*scheduler.DeleteNodeResponse, error)
DeleteNode deletes a node by ID.
func (*Elastic) GetNode ¶
func (es *Elastic) GetNode(ctx context.Context, req *scheduler.GetNodeRequest) (*scheduler.Node, error)
GetNode gets a node
func (*Elastic) ListNodes ¶
func (es *Elastic) ListNodes(ctx context.Context, req *scheduler.ListNodesRequest) (*scheduler.ListNodesResponse, error)
ListNodes is an API endpoint that returns a list of nodes.
func (*Elastic) ListTasks ¶
func (es *Elastic) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
ListTasks lists tasks, duh.
func (*Elastic) PutNode ¶
func (es *Elastic) PutNode(ctx context.Context, node *scheduler.Node) (*scheduler.PutNodeResponse, error)
PutNode puts a node in the database.
For optimisic locking, if the node already exists and node.Version doesn't match the version in the database, an error is returned.
Click to show internal directories.
Click to hide internal directories.