legacy

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HeartbeatMessageType = "heartbeat"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AskForBidRequest

type AskForBidRequest struct {
	RoutingMetadata
	// Execution specifies the job to be executed.
	Execution *models.Execution
	// WaitForApproval specifies whether the compute node should wait for the requester to approve the bid.
	// if set to true, the compute node will not start the execution until the requester approves the bid.
	// If set to false, the compute node will automatically start the execution after bidding and when resources are available.
	WaitForApproval bool
}

type AskForBidResponse

type AskForBidResponse struct {
	ExecutionMetadata
}

type BidAcceptedRequest

type BidAcceptedRequest struct {
	RoutingMetadata
	ExecutionID   string
	Accepted      bool
	Justification string
}

type BidAcceptedResponse

type BidAcceptedResponse struct {
	ExecutionMetadata
}

type BidRejectedRequest

type BidRejectedRequest struct {
	RoutingMetadata
	ExecutionID   string
	Justification string
}

type BidRejectedResponse

type BidRejectedResponse struct {
	ExecutionMetadata
}

type BidResult

type BidResult struct {
	RoutingMetadata
	ExecutionMetadata
	Accepted bool
	Wait     bool
	Event    models.Event
}

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 {
	RoutingMetadata
	ExecutionID   string
	Justification string
}

type CancelExecutionResponse

type CancelExecutionResponse struct {
	ExecutionMetadata
}

type CancelResult

type CancelResult struct {
	RoutingMetadata
	ExecutionMetadata
}

type ComputeError

type ComputeError struct {
	RoutingMetadata
	ExecutionMetadata
	Event models.Event
}

func (ComputeError) Error

func (e ComputeError) Error() string

type ExecutionMetadata

type ExecutionMetadata struct {
	ExecutionID string
	JobID       string
}

func NewExecutionMetadata

func NewExecutionMetadata(execution *models.Execution) ExecutionMetadata

type Heartbeat added in v1.6.0

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 added in v1.6.0

type RegisterRequest struct {
	Info models.NodeInfo
}

type RegisterResponse added in v1.6.0

type RegisterResponse struct {
	Accepted bool
	Reason   string
}

type RoutingMetadata

type RoutingMetadata struct {
	SourcePeerID string
	TargetPeerID string
}

type RunResult

type RunResult struct {
	RoutingMetadata
	ExecutionMetadata
	PublishResult    *models.SpecConfig
	RunCommandResult *models.RunCommandResult
}

type UpdateInfoRequest added in v1.6.0

type UpdateInfoRequest struct {
	Info models.NodeInfo
}

type UpdateInfoResponse added in v1.6.0

type UpdateInfoResponse struct {
	Accepted bool
	Reason   string
}

type UpdateResourcesRequest added in v1.6.0

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

type UpdateResourcesResponse added in v1.6.0

type UpdateResourcesResponse struct{}

Jump to

Keyboard shortcuts

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