Documentation ¶
Index ¶
- type Elastic
- func (es *Elastic) Close() error
- func (es *Elastic) CreateTask(ctx context.Context, task *tes.Task) error
- func (es *Elastic) DeleteNode(ctx context.Context, node *pbs.Node) error
- func (es *Elastic) GetNode(ctx context.Context, req *pbs.GetNodeRequest) (*pbs.Node, error)
- func (es *Elastic) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes.Task, error)
- func (es *Elastic) Init(ctx context.Context) error
- func (es *Elastic) ListNodes(ctx context.Context, req *pbs.ListNodesRequest) (*pbs.ListNodesResponse, error)
- func (es *Elastic) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
- func (es *Elastic) PutNode(ctx context.Context, node *pbs.Node) (*pbs.PutNodeResponse, error)
- func (es *Elastic) QueueTask(task *tes.Task) error
- func (es *Elastic) ReadQueue(n int) []*tes.Task
- func (es *Elastic) Write(ev *events.Event) error
- func (es *Elastic) WriteContext(ctx context.Context, ev *events.Event) error
- type TES
- func (et *TES) CancelTask(ctx context.Context, req *tes.CancelTaskRequest) (*tes.CancelTaskResponse, error)
- func (et *TES) CreateEvent(ctx context.Context, req *events.Event) (*events.CreateEventResponse, error)
- func (et *TES) CreateTask(ctx context.Context, task *tes.Task) (*tes.CreateTaskResponse, error)
- func (et *TES) GetServiceInfo(ctx context.Context, info *tes.ServiceInfoRequest) (*tes.ServiceInfo, error)
- func (et *TES) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes.Task, error)
- func (et *TES) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
- func (et *TES) WithComputeBackend(b compute.Backend)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Elastic ¶
type Elastic struct {
// contains filtered or unexported fields
}
Elastic provides an elasticsearch database server backend.
func NewElastic ¶
NewElastic returns a new Elastic instance.
func (*Elastic) CreateTask ¶
CreateTask creates a new task.
func (*Elastic) DeleteNode ¶
DeleteNode deletes a node by ID.
func (*Elastic) ListNodes ¶
func (es *Elastic) ListNodes(ctx context.Context, req *pbs.ListNodesRequest) (*pbs.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 ¶
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.
type TES ¶
TES provides the TES API endpoints, backed by elasticsearch.
func (*TES) CancelTask ¶
func (et *TES) CancelTask(ctx context.Context, req *tes.CancelTaskRequest) (*tes.CancelTaskResponse, error)
CancelTask cancels a task by ID.
func (*TES) CreateEvent ¶
func (et *TES) CreateEvent(ctx context.Context, req *events.Event) (*events.CreateEventResponse, error)
CreateEvent writes a task event to the database.
func (*TES) CreateTask ¶
CreateTask creates a new task.
func (*TES) GetServiceInfo ¶
func (et *TES) GetServiceInfo(ctx context.Context, info *tes.ServiceInfoRequest) (*tes.ServiceInfo, error)
GetServiceInfo returns service metadata.
func (*TES) ListTasks ¶
func (et *TES) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
ListTasks lists tasks. TODO list is maybe where the having the TES api separated from the core
database breaks down.
func (*TES) WithComputeBackend ¶
WithComputeBackend sets the compute backend.