runtimecontract

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package runtimecontract defines the Kubernetes-neutral command payload shared by the control plane and an outbound cluster Agent.

Index

Constants

View Source
const (
	OperationEnsureWorkspace          = "EnsureWorkspace"
	OperationEnsureWorkspacePlacement = "EnsureWorkspacePlacement"
	OperationApplyDeployment          = "ApplyDeployment"
	OperationDeleteAppEnv             = "DeleteAppEnvironment"
	OperationEnsureVolume             = "EnsureVolume"
	OperationExpandVolume             = "ExpandVolume"
	OperationDeleteVolume             = "DeleteVolume"

	ExposurePrivate = "Private"
	ExposurePublic  = "Public"
	EndpointHTTP    = "HTTP"
	EndpointTCP     = "TCP"

	WorkloadStateless = "Stateless"
	WorkloadStateful  = "Stateful"

	StatePending     = "Pending"
	StateProgressing = "Progressing"
	StateReady       = "Ready"
	StateDegraded    = "Degraded"
	StateUnknown     = "Unknown"

	VolumeDesiredReady   = "Ready"
	VolumeDesiredDeleted = "Deleted"
	VolumeStatePending   = "Pending"
	VolumeStateReady     = "Ready"
	VolumeStateRetained  = "Retained"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppVolume

type AppVolume struct {
	PublicID        string `json:"id"`
	MountPath       string `json:"mountPath"`
	SizeGiB         int64  `json:"sizeGiB"`
	RetentionPolicy string `json:"retentionPolicy"`
}

type DeploymentIntent

type DeploymentIntent struct {
	Image                string           `json:"image"`
	Replicas             int32            `json:"replicas"`
	Ports                []RuntimePort    `json:"ports"`
	Resources            Resources        `json:"resources"`
	Probes               Probes           `json:"probes"`
	PublicEndpoints      []PublicEndpoint `json:"publicEndpoints"`
	Variables            []Variable       `json:"variables"`
	SecretVariables      []Variable       `json:"secretVariables,omitempty"`
	ConfigurationVersion int64            `json:"configurationVersion"`
	WorkloadKind         string           `json:"workloadKind"`
	Volume               *AppVolume       `json:"volume,omitempty"`
	Port                 int32            `json:"port,omitempty"`
	Exposure             string           `json:"exposure,omitempty"`
	Slug                 string           `json:"slug,omitempty"`
}

type Payload

type Payload struct {
	Namespace  string                    `json:"namespace"`
	Name       string                    `json:"name,omitempty"`
	Deployment *DeploymentIntent         `json:"deployment,omitempty"`
	Volume     *VolumeIntent             `json:"volume,omitempty"`
	Placement  *WorkspacePlacementIntent `json:"placement,omitempty"`
}

Payload contains exactly the fields required by one runtime operation.

type Probe

type Probe struct {
	Type     string `json:"type"`
	PortName string `json:"portName"`
	Path     string `json:"path,omitempty"`
}

type Probes

type Probes struct {
	Startup   Probe `json:"startup"`
	Liveness  Probe `json:"liveness"`
	Readiness Probe `json:"readiness"`
}

type PublicEndpoint

type PublicEndpoint struct {
	Name          string `json:"name"`
	Type          string `json:"type"`
	PortName      string `json:"portName"`
	HostnameLabel string `json:"hostnameLabel"`
	Hostname      string `json:"hostname"`
	ExternalPort  int32  `json:"externalPort,omitempty"`
}

type ResourceValues

type ResourceValues struct {
	CPUMillis int64 `json:"cpuMillis"`
	MemoryMiB int64 `json:"memoryMiB"`
}

type Resources

type Resources struct {
	Requests ResourceValues `json:"requests"`
	Limits   ResourceValues `json:"limits"`
}

type RuntimePort

type RuntimePort struct {
	Name          string `json:"name"`
	ContainerPort int32  `json:"containerPort"`
	Protocol      string `json:"protocol"`
}

type Variable

type Variable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type VolumeIntent

type VolumeIntent struct {
	RuntimeBinding  string `json:"runtimeBinding"`
	SizeGiB         int64  `json:"sizeGiB"`
	RetentionPolicy string `json:"retentionPolicy"`
	DesiredState    string `json:"desiredState"`
}

type WorkspacePlacementIntent

type WorkspacePlacementIntent struct {
	WorkspaceID    string `json:"workspaceId"`
	NamespaceName  string `json:"namespaceName"`
	AccessProfile  string `json:"accessProfile"`
	LifecycleState string `json:"lifecycleState"`
}

Jump to

Keyboard shortcuts

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