Documentation
¶
Index ¶
- type GatewayClient
- func (c *GatewayClient) AckTaskInput(ctx context.Context, inputID string) error
- func (c *GatewayClient) AllocateIP(ctx context.Context, sandboxID, workerID string) (*types.IPAllocation, error)
- func (c *GatewayClient) AppendTaskOutputRows(ctx context.Context, req *pb.AppendTaskOutputRowsRequest) error
- func (c *GatewayClient) ClaimTaskInput(ctx context.Context, taskID, runID, executionID string) (*pb.ClaimTaskInputResponse, error)
- func (c *GatewayClient) Close() error
- func (c *GatewayClient) CreateTaskOutput(ctx context.Context, req *pb.CreateTaskOutputRequest) (string, error)
- func (c *GatewayClient) Deregister(ctx context.Context, workerId string) error
- func (c *GatewayClient) FinalizeTaskOutput(ctx context.Context, req *pb.FinalizeTaskOutputRequest) error
- func (c *GatewayClient) GetWorker(ctx context.Context, workerId string) (*types.Worker, error)
- func (c *GatewayClient) Heartbeat(ctx context.Context, workerId string) error
- func (c *GatewayClient) RegisterWorker(ctx context.Context, req *RegisterWorkerRequest) (*RegisterWorkerResponse, error)
- func (c *GatewayClient) ReleaseIP(ctx context.Context, sandboxID string) error
- func (c *GatewayClient) SetTaskResult(ctx context.Context, taskID string, attemptID string, ...) error
- func (c *GatewayClient) SetTaskStarted(ctx context.Context, taskID string, attemptID string) error
- func (c *GatewayClient) UpdateStatus(ctx context.Context, workerId string, workerStatus types.WorkerStatus) error
- func (c *GatewayClient) UpdateTaskOutputStatus(ctx context.Context, req *pb.UpdateTaskOutputStatusRequest) error
- func (c *GatewayClient) UpdateTaskState(ctx context.Context, update types.TaskLiveUpdate) error
- type RegisterWorkerRequest
- type RegisterWorkerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GatewayClient ¶
type GatewayClient struct {
// contains filtered or unexported fields
}
GatewayClient is a gRPC client for communicating with the gateway.
func NewGatewayClient ¶
func NewGatewayClient(addr string, authToken string) (*GatewayClient, error)
NewGatewayClient creates a new gateway gRPC client.
func (*GatewayClient) AckTaskInput ¶ added in v0.1.98
func (c *GatewayClient) AckTaskInput(ctx context.Context, inputID string) error
AckTaskInput acknowledges that a claimed input has been consumed.
func (*GatewayClient) AllocateIP ¶
func (c *GatewayClient) AllocateIP(ctx context.Context, sandboxID, workerID string) (*types.IPAllocation, error)
AllocateIP requests an IP allocation for a sandbox from the gateway.
func (*GatewayClient) AppendTaskOutputRows ¶ added in v0.1.96
func (c *GatewayClient) AppendTaskOutputRows(ctx context.Context, req *pb.AppendTaskOutputRowsRequest) error
AppendTaskOutputRows appends rows to a streaming table output via gRPC.
func (*GatewayClient) ClaimTaskInput ¶ added in v0.1.98
func (c *GatewayClient) ClaimTaskInput(ctx context.Context, taskID, runID, executionID string) (*pb.ClaimTaskInputResponse, error)
ClaimTaskInput claims the next pending durable input for a task.
func (*GatewayClient) Close ¶
func (c *GatewayClient) Close() error
Close closes the gRPC connection.
func (*GatewayClient) CreateTaskOutput ¶ added in v0.1.96
func (c *GatewayClient) CreateTaskOutput(ctx context.Context, req *pb.CreateTaskOutputRequest) (string, error)
CreateTaskOutput creates a structured output for a task via gRPC.
func (*GatewayClient) Deregister ¶
func (c *GatewayClient) Deregister(ctx context.Context, workerId string) error
Deregister removes the worker from the gateway.
func (*GatewayClient) FinalizeTaskOutput ¶ added in v0.1.96
func (c *GatewayClient) FinalizeTaskOutput(ctx context.Context, req *pb.FinalizeTaskOutputRequest) error
FinalizeTaskOutput sets the summary on an output via gRPC.
func (*GatewayClient) Heartbeat ¶
func (c *GatewayClient) Heartbeat(ctx context.Context, workerId string) error
Heartbeat sends a heartbeat for the worker.
func (*GatewayClient) RegisterWorker ¶
func (c *GatewayClient) RegisterWorker(ctx context.Context, req *RegisterWorkerRequest) (*RegisterWorkerResponse, error)
RegisterWorker registers a worker with the gateway.
func (*GatewayClient) ReleaseIP ¶
func (c *GatewayClient) ReleaseIP(ctx context.Context, sandboxID string) error
ReleaseIP releases an IP allocation for a sandbox.
func (*GatewayClient) SetTaskResult ¶
func (c *GatewayClient) SetTaskResult(ctx context.Context, taskID string, attemptID string, result *types.RunExecutionResult) error
SetTaskResult reports the result of a task to the gateway.
func (*GatewayClient) SetTaskStarted ¶
SetTaskStarted marks a task as running in Postgres.
func (*GatewayClient) UpdateStatus ¶
func (c *GatewayClient) UpdateStatus(ctx context.Context, workerId string, workerStatus types.WorkerStatus) error
UpdateStatus updates the worker's status.
func (*GatewayClient) UpdateTaskOutputStatus ¶ added in v0.1.106
func (c *GatewayClient) UpdateTaskOutputStatus(ctx context.Context, req *pb.UpdateTaskOutputStatusRequest) error
UpdateTaskOutputStatus updates the lifecycle status of a task output via gRPC.
func (*GatewayClient) UpdateTaskState ¶ added in v0.1.96
func (c *GatewayClient) UpdateTaskState(ctx context.Context, update types.TaskLiveUpdate) error
type RegisterWorkerRequest ¶
type RegisterWorkerRequest struct {
Hostname string
PoolName string
Cpu int64
Memory int64
Version string
}
RegisterWorkerRequest is the request for registering a worker.
type RegisterWorkerResponse ¶
type RegisterWorkerResponse struct {
WorkerID string
}
RegisterWorkerResponse is the response from registering a worker.