Documentation ¶
Index ¶
- type DynamoDB
- func (db *DynamoDB) CancelTask(ctx context.Context, req *tes.CancelTaskRequest) (*tes.CancelTaskResponse, error)
- func (db *DynamoDB) Close() error
- func (db *DynamoDB) CreateEvent(ctx context.Context, req *events.Event) (*events.CreateEventResponse, error)
- func (db *DynamoDB) CreateTask(ctx context.Context, task *tes.Task) (*tes.CreateTaskResponse, error)
- func (db *DynamoDB) DeleteNode(ctx context.Context, req *pbs.Node) error
- func (db *DynamoDB) GetNode(ctx context.Context, req *pbs.GetNodeRequest) (*pbs.Node, error)
- func (db *DynamoDB) GetServiceInfo(ctx context.Context, info *tes.ServiceInfoRequest) (*tes.ServiceInfo, error)
- func (db *DynamoDB) GetTask(ctx context.Context, req *tes.GetTaskRequest) (*tes.Task, error)
- func (db *DynamoDB) Init(ctx context.Context) error
- func (db *DynamoDB) ListNodes(ctx context.Context, req *pbs.ListNodesRequest) (*pbs.ListNodesResponse, error)
- func (db *DynamoDB) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
- func (db *DynamoDB) PutNode(ctx context.Context, req *pbs.Node) (*pbs.PutNodeResponse, error)
- func (db *DynamoDB) QueueTask(task *tes.Task) error
- func (db *DynamoDB) ReadQueue(n int) []*tes.Task
- func (db *DynamoDB) WithComputeBackend(backend compute.Backend)
- func (db *DynamoDB) Write(req *events.Event) error
- func (db *DynamoDB) WriteContext(ctx context.Context, e *events.Event) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoDB ¶
type DynamoDB struct {
// contains filtered or unexported fields
}
DynamoDB provides handlers for gRPC endpoints Data is stored/retrieved from the Amazon DynamoDB NoSQL database.
func NewDynamoDB ¶
NewDynamoDB returns a new instance of DynamoDB, accessing the database at the given url, and including the given ServerConfig.
func (*DynamoDB) CancelTask ¶
func (db *DynamoDB) CancelTask(ctx context.Context, req *tes.CancelTaskRequest) (*tes.CancelTaskResponse, error)
CancelTask cancels a task
func (*DynamoDB) CreateEvent ¶
func (db *DynamoDB) CreateEvent(ctx context.Context, req *events.Event) (*events.CreateEventResponse, error)
CreateEvent creates an event for the server to handle.
func (*DynamoDB) CreateTask ¶
func (db *DynamoDB) CreateTask(ctx context.Context, task *tes.Task) (*tes.CreateTaskResponse, error)
CreateTask provides an HTTP/gRPC endpoint for creating a task. This is part of the TES implementation.
func (*DynamoDB) DeleteNode ¶
DeleteNode deletes a node
func (*DynamoDB) GetServiceInfo ¶
func (db *DynamoDB) GetServiceInfo(ctx context.Context, info *tes.ServiceInfoRequest) (*tes.ServiceInfo, error)
GetServiceInfo provides an endpoint for Funnel clients to get information about this server.
func (*DynamoDB) Init ¶
Init creates tables in DynamoDB. If these tables already exist, a Debug level log is produced.
func (*DynamoDB) ListNodes ¶
func (db *DynamoDB) ListNodes(ctx context.Context, req *pbs.ListNodesRequest) (*pbs.ListNodesResponse, error)
ListNodes is an API endpoint that returns a list of nodes.
func (*DynamoDB) ListTasks ¶
func (db *DynamoDB) ListTasks(ctx context.Context, req *tes.ListTasksRequest) (*tes.ListTasksResponse, error)
ListTasks returns a list of taskIDs
func (*DynamoDB) PutNode ¶
PutNode is an RPC endpoint that is used by nodes to send heartbeats and status updates, such as completed tasks. The server responds with updated information for the node, such as canceled tasks.
func (*DynamoDB) ReadQueue ¶
ReadQueue returns a slice of queued Tasks. Up to "n" tasks are returned.
func (*DynamoDB) WithComputeBackend ¶
WithComputeBackend configures the DynamoDB instance to use the given compute.Backend. The compute backend is responsible for dispatching tasks to schedulers / compute resources with its Submit method.