messages

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AskForBidMessageType       = "AskForBid"
	BidAcceptedMessageType     = "BidAccepted"
	BidRejectedMessageType     = "BidRejected"
	CancelExecutionMessageType = "CancelExecution"

	BidResultMessageType    = "BidResult"
	RunResultMessageType    = "RunResult"
	ComputeErrorMessageType = "ComputeError"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AskForBidRequest

type AskForBidRequest struct {
	BaseRequest
	// Execution specifies the job to be executed.
	Execution *models.Execution
}

type BaseRequest

type BaseRequest struct {
	Events []*models.Event
}

BaseRequest is the base request model for all requests.

func (BaseRequest) Message

func (r BaseRequest) Message() string

Message returns a request message if available.

type BaseResponse

type BaseResponse struct {
	ExecutionID string
	JobID       string
	JobType     string
	Events      []*models.Event
}

BaseResponse is the base response model for all responses.

func NewBaseResponse

func NewBaseResponse(execution *models.Execution) BaseResponse

func (BaseResponse) Message

func (r BaseResponse) Message() string

Message returns a response message if available.

type BidAcceptedRequest

type BidAcceptedRequest struct {
	BaseRequest
	ExecutionID string
	Accepted    bool
}

type BidRejectedRequest

type BidRejectedRequest struct {
	BaseRequest
	ExecutionID string
}

type BidResult

type BidResult struct {
	BaseResponse
	Accepted bool
}

BidResult is the result of the compute node bidding on a job that is returned to the caller through a Callback.

type CancelExecutionRequest

type CancelExecutionRequest struct {
	BaseRequest
	ExecutionID string
}

type ComputeError

type ComputeError struct {
	BaseResponse
}

func (ComputeError) Error

func (e ComputeError) Error() string

type ExecutionLogsRequest

type ExecutionLogsRequest struct {
	ExecutionID string
	NodeID      string
	Tail        bool
	Follow      bool
}

type ExecutionLogsResponse

type ExecutionLogsResponse struct {
	Address           string
	ExecutionFinished bool
}

type Heartbeat

type Heartbeat struct {
	NodeID   string
	Sequence uint64
}

Heartbeat represents a heartbeat message from a specific node. It contains the node ID and the sequence number of the heartbeat which is monotonically increasing (reboots aside). We do not use timestamps on the client, we rely solely on the server-side time to avoid clock drift issues.

type RegisterRequest

type RegisterRequest struct {
	Info models.NodeInfo
}

type RegisterResponse

type RegisterResponse struct {
	Accepted bool
	Reason   string
}

type RunResult

type RunResult struct {
	BaseResponse
	PublishResult    *models.SpecConfig
	RunCommandResult *models.RunCommandResult
}

type UpdateInfoRequest

type UpdateInfoRequest struct {
	Info models.NodeInfo
}

type UpdateInfoResponse

type UpdateInfoResponse struct {
	Accepted bool
	Reason   string
}

type UpdateResourcesRequest

type UpdateResourcesRequest struct {
	NodeID            string
	AvailableCapacity models.Resources
	QueueUsedCapacity models.Resources
}

type UpdateResourcesResponse

type UpdateResourcesResponse struct{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL