Documentation
¶
Index ¶
- Constants
- type CellDoc
- type CellMetadata
- type CellSpec
- type CellState
- type CellStatus
- type ContainerDoc
- type ContainerMetadata
- type ContainerSpec
- type ContainerState
- type ContainerStatus
- type Kind
- type RealmDoc
- type RealmMetadata
- type RealmSpec
- type RealmState
- type RealmStatus
- type RegistryCredentials
- type SpaceDoc
- type SpaceMetadata
- type SpaceSpec
- type SpaceState
- type SpaceStatus
- type StackDoc
- type StackMetadata
- type StackSpec
- type StackState
- type StackStatus
- type Version
Constants ¶
View Source
const ( StatePendingStr = "Pending" StateReadyStr = "Ready" StateStoppedStr = "Stopped" StatePausedStr = "Paused" StatePausingStr = "Pausing" StateFailedStr = "Failed" StateUnknownStr = "Unknown" StateCreatingStr = "Creating" StateDeletingStr = "Deleting" )
Common printable state strings.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CellDoc ¶
type CellDoc struct {
APIVersion Version `json:"apiVersion" yaml:"apiVersion"`
Kind Kind `json:"kind" yaml:"kind"`
Metadata CellMetadata `json:"metadata" yaml:"metadata"`
Spec CellSpec `json:"spec" yaml:"spec"`
Status CellStatus `json:"status" yaml:"status"`
}
func NewCellDoc ¶
NewCellDoc creates a CellDoc ensuring all nested structs are initialized.
type CellMetadata ¶
type CellSpec ¶
type CellSpec struct {
ID string `json:"id" yaml:"id"`
RealmID string `json:"realmId" yaml:"realmId"`
SpaceID string `json:"spaceId" yaml:"spaceId"`
StackID string `json:"stackId" yaml:"stackId"`
RootContainerID string `json:"rootContainerId,omitempty" yaml:"rootContainerId,omitempty"`
Containers []ContainerSpec `json:"containers" yaml:"containers"`
}
type CellStatus ¶
type CellStatus struct {
State CellState `json:"state" yaml:"state"`
CgroupPath string `json:"cgroupPath" yaml:"cgroupPath"`
Containers []ContainerStatus `json:"containers" yaml:"containers"`
}
type ContainerDoc ¶
type ContainerDoc struct {
APIVersion Version `json:"apiVersion" yaml:"apiVersion"`
Kind Kind `json:"kind" yaml:"kind"`
Metadata ContainerMetadata `json:"metadata" yaml:"metadata"`
Spec ContainerSpec `json:"spec" yaml:"spec"`
Status ContainerStatus `json:"status" yaml:"status"`
}
func NewContainerDoc ¶
func NewContainerDoc(from *ContainerDoc) *ContainerDoc
NewContainerDoc creates a ContainerDoc ensuring all nested structs are initialized.
type ContainerMetadata ¶
type ContainerSpec ¶
type ContainerSpec struct {
ID string `json:"id" yaml:"id"`
ContainerdID string `json:"containerdId,omitempty" yaml:"containerdId,omitempty"`
RealmID string `json:"realmId" yaml:"realmId"`
SpaceID string `json:"spaceId" yaml:"spaceId"`
StackID string `json:"stackId" yaml:"stackId"`
CellID string `json:"cellId" yaml:"cellId"`
Root bool `json:"root,omitempty" yaml:"root,omitempty"`
Image string `json:"image" yaml:"image"`
Command string `json:"command" yaml:"command"`
Args []string `json:"args" yaml:"args"`
Env []string `json:"env" yaml:"env"`
Ports []string `json:"ports" yaml:"ports"`
Volumes []string `json:"volumes" yaml:"volumes"`
Networks []string `json:"networks" yaml:"networks"`
NetworksAliases []string `json:"networksAliases" yaml:"networksAliases"`
Privileged bool `json:"privileged" yaml:"privileged"`
CNIConfigPath string `json:"cniConfigPath,omitempty" yaml:"cniConfigPath,omitempty"`
RestartPolicy string `json:"restartPolicy" yaml:"restartPolicy"`
}
type ContainerState ¶
type ContainerState int
const ( ContainerStatePending ContainerState = iota ContainerStateReady ContainerStateStopped ContainerStatePaused ContainerStatePausing ContainerStateFailed ContainerStateUnknown )
func (*ContainerState) String ¶
func (c *ContainerState) String() string
type ContainerStatus ¶
type ContainerStatus struct {
Name string `json:"name" yaml:"name"`
ID string `json:"id" yaml:"id"`
State ContainerState `json:"state" yaml:"state"`
RestartCount int `json:"restartCount" yaml:"restartCount"`
RestartTime time.Time `json:"restartTime" yaml:"restartTime"`
StartTime time.Time `json:"startTime" yaml:"startTime"`
FinishTime time.Time `json:"finishTime" yaml:"finishTime"`
ExitCode int `json:"exitCode" yaml:"exitCode"`
ExitSignal string `json:"exitSignal" yaml:"exitSignal"`
}
type Kind ¶
type Kind string
const ( // KindCell identifies cell documents. KindCell Kind = "Cell" // KindContainer identifies container documents. KindContainer Kind = "Container" // KindRealm identifies realm documents. KindRealm Kind = "Realm" // KindSpace identifies space documents. KindSpace Kind = "Space" // KindStack identifies stack documents. KindStack Kind = "Stack" )
Kinds.
type RealmDoc ¶
type RealmDoc struct {
APIVersion Version `json:"apiVersion" yaml:"apiVersion"`
Kind Kind `json:"kind" yaml:"kind"`
Metadata RealmMetadata `json:"metadata" yaml:"metadata"`
Spec RealmSpec `json:"spec" yaml:"spec"`
Status RealmStatus `json:"status" yaml:"status"`
}
type RealmMetadata ¶
type RealmSpec ¶
type RealmSpec struct {
Namespace string `json:"namespace" yaml:"namespace"`
RegistryCredentials []RegistryCredentials `json:"registryCredentials,omitempty" yaml:"registryCredentials,omitempty"`
}
type RealmState ¶
type RealmState int
const ( RealmStatePending RealmState = iota RealmStateCreating RealmStateReady RealmStateDeleting RealmStateFailed RealmStateUnknown )
func (*RealmState) String ¶
func (r *RealmState) String() string
type RealmStatus ¶
type RealmStatus struct {
State RealmState `json:"state"`
CgroupPath string `json:"cgroupPath,omitempty" yaml:"cgroupPath,omitempty"`
}
type RegistryCredentials ¶
type RegistryCredentials struct {
// Username is the registry username.
Username string `json:"username" yaml:"username"`
// Password is the registry password or token.
Password string `json:"password" yaml:"password"`
// ServerAddress is the registry server address (e.g., "docker.io", "registry.example.com").
// If empty, credentials apply to the registry extracted from the image reference.
ServerAddress string `json:"serverAddress,omitempty" yaml:"serverAddress,omitempty"`
}
RegistryCredentials contains authentication information for a container registry.
type SpaceDoc ¶
type SpaceDoc struct {
APIVersion Version `json:"apiVersion" yaml:"apiVersion"`
Kind Kind `json:"kind" yaml:"kind"`
Metadata SpaceMetadata `json:"metadata" yaml:"metadata"`
Spec SpaceSpec `json:"spec" yaml:"spec"`
Status SpaceStatus `json:"status" yaml:"status"`
}
type SpaceMetadata ¶
type SpaceState ¶
type SpaceState int
const ( SpaceStatePending SpaceState = iota SpaceStateReady SpaceStateFailed SpaceStateUnknown )
func (*SpaceState) String ¶
func (s *SpaceState) String() string
type SpaceStatus ¶
type SpaceStatus struct {
State SpaceState `json:"state" yaml:"state"`
CgroupPath string `json:"cgroupPath,omitempty" yaml:"cgroupPath,omitempty"`
}
type StackDoc ¶
type StackDoc struct {
APIVersion Version `json:"apiVersion" yaml:"apiVersion"`
Kind Kind `json:"kind" yaml:"kind"`
Metadata StackMetadata `json:"metadata" yaml:"metadata"`
Spec StackSpec `json:"spec" yaml:"spec"`
Status StackStatus `json:"status" yaml:"status"`
}
type StackMetadata ¶
type StackState ¶
type StackState int
const ( StackStatePending StackState = iota StackStateReady StackStateFailed StackStateUnknown )
func (*StackState) String ¶
func (s *StackState) String() string
type StackStatus ¶
type StackStatus struct {
State StackState `json:"state" yaml:"state"`
CgroupPath string `json:"cgroupPath" yaml:"cgroupPath"`
}
Click to show internal directories.
Click to hide internal directories.