Documentation
¶
Overview ¶
Package kukeonv1 is the public client SDK for the kukeon daemon. It exposes a transport-agnostic Client interface; Dial picks a concrete implementation (unix socket JSON-RPC today, ssh tunnel in the future) based on the address scheme.
Index ¶
- Constants
- Variables
- func FromAPIError(e *APIError) error
- func KindFromError(err error) string
- type APIError
- type ApplyDocumentsArgs
- type ApplyDocumentsReply
- type ApplyDocumentsResult
- type ApplyResourceResult
- type AttachContainerArgs
- type AttachContainerReply
- type AttachContainerResult
- type CellFromConfigRequest
- type CellNetworkDetail
- type CgroupCPU
- type CgroupCPUMax
- type CgroupDeclaredResource
- type CgroupIOMax
- type CgroupIOMaxEntry
- type CgroupList
- type CgroupLive
- type CgroupMemory
- type CgroupPids
- type CgroupScope
- type CgroupValue
- type Client
- type ContainerCreationOutcome
- type ContainerNetworkDetail
- type ContainerNetworkSummary
- type CreateCellArgs
- type CreateCellFromConfigArgs
- type CreateCellFromConfigReply
- type CreateCellFromConfigResult
- type CreateCellReply
- type CreateCellResult
- type CreateConfigArgs
- type CreateConfigReply
- type CreateConfigResult
- type CreateRealmArgs
- type CreateRealmReply
- type CreateRealmResult
- type CreateSecretArgs
- type CreateSecretReply
- type CreateSecretResult
- type CreateSpaceArgs
- type CreateSpaceReply
- type CreateSpaceResult
- type CreateStackArgs
- type CreateStackReply
- type CreateStackResult
- type CreateVolumeArgs
- type CreateVolumeReply
- type CreateVolumeResult
- type DeleteBlueprintArgs
- type DeleteBlueprintReply
- type DeleteBlueprintResult
- type DeleteCellArgs
- type DeleteCellReply
- type DeleteCellResult
- type DeleteConfigArgs
- type DeleteConfigReply
- type DeleteConfigResult
- type DeleteDocumentsArgs
- type DeleteDocumentsReply
- type DeleteDocumentsResult
- type DeleteImageResult
- type DeleteRealmArgs
- type DeleteRealmReply
- type DeleteRealmResult
- type DeleteResourceResult
- type DeleteSecretArgs
- type DeleteSecretReply
- type DeleteSecretResult
- type DeleteSpaceArgs
- type DeleteSpaceReply
- type DeleteSpaceResult
- type DeleteStackArgs
- type DeleteStackReply
- type DeleteStackResult
- type DeleteVolumeArgs
- type DeleteVolumeReply
- type DeleteVolumeResult
- type FakeClient
- func (FakeClient) ApplyDocuments(context.Context, []byte) (ApplyDocumentsResult, error)
- func (FakeClient) ApplyDocumentsForTeam(context.Context, []byte, string) (ApplyDocumentsResult, error)
- func (FakeClient) AttachContainer(context.Context, v1beta1.ContainerDoc) (AttachContainerResult, error)
- func (FakeClient) Close() error
- func (FakeClient) CreateCell(context.Context, v1beta1.CellDoc) (CreateCellResult, error)
- func (FakeClient) CreateCellFromConfig(context.Context, CellFromConfigRequest) (CreateCellFromConfigResult, error)
- func (FakeClient) CreateConfig(context.Context, v1beta1.CellConfigDoc) (CreateConfigResult, error)
- func (FakeClient) CreateRealm(context.Context, v1beta1.RealmDoc) (CreateRealmResult, error)
- func (FakeClient) CreateSecret(context.Context, v1beta1.SecretDoc) (CreateSecretResult, error)
- func (FakeClient) CreateSpace(context.Context, v1beta1.SpaceDoc) (CreateSpaceResult, error)
- func (FakeClient) CreateStack(context.Context, v1beta1.StackDoc) (CreateStackResult, error)
- func (FakeClient) CreateVolume(context.Context, v1beta1.VolumeDoc) (CreateVolumeResult, error)
- func (FakeClient) DeleteBlueprint(context.Context, v1beta1.CellBlueprintDoc) (DeleteBlueprintResult, error)
- func (FakeClient) DeleteCell(context.Context, v1beta1.CellDoc) (DeleteCellResult, error)
- func (FakeClient) DeleteConfig(context.Context, v1beta1.CellConfigDoc) (DeleteConfigResult, error)
- func (FakeClient) DeleteDocuments(context.Context, []byte, bool, bool) (DeleteDocumentsResult, error)
- func (FakeClient) DeleteRealm(context.Context, v1beta1.RealmDoc, bool, bool) (DeleteRealmResult, error)
- func (FakeClient) DeleteSecret(context.Context, v1beta1.SecretDoc) (DeleteSecretResult, error)
- func (FakeClient) DeleteSpace(context.Context, v1beta1.SpaceDoc, bool, bool) (DeleteSpaceResult, error)
- func (FakeClient) DeleteStack(context.Context, v1beta1.StackDoc, bool, bool) (DeleteStackResult, error)
- func (FakeClient) DeleteVolume(context.Context, v1beta1.VolumeDoc) (DeleteVolumeResult, error)
- func (FakeClient) GetBlueprint(context.Context, v1beta1.CellBlueprintDoc) (GetBlueprintResult, error)
- func (FakeClient) GetCell(context.Context, v1beta1.CellDoc) (GetCellResult, error)
- func (FakeClient) GetCgroupDetail(context.Context, CgroupScope) (GetCgroupDetailResult, error)
- func (FakeClient) GetConfig(context.Context, v1beta1.CellConfigDoc) (GetConfigResult, error)
- func (FakeClient) GetContainer(context.Context, v1beta1.ContainerDoc) (GetContainerResult, error)
- func (FakeClient) GetImage(context.Context, string, string) (GetImageResult, error)
- func (FakeClient) GetNetworkDetail(context.Context, NetworkScope) (GetNetworkDetailResult, error)
- func (FakeClient) GetRealm(context.Context, v1beta1.RealmDoc) (GetRealmResult, error)
- func (FakeClient) GetSecret(context.Context, v1beta1.SecretDoc) (GetSecretResult, error)
- func (FakeClient) GetSpace(context.Context, v1beta1.SpaceDoc) (GetSpaceResult, error)
- func (FakeClient) GetStack(context.Context, v1beta1.StackDoc) (GetStackResult, error)
- func (FakeClient) GetVolume(context.Context, v1beta1.VolumeDoc) (GetVolumeResult, error)
- func (FakeClient) KillCell(context.Context, v1beta1.CellDoc) (KillCellResult, error)
- func (FakeClient) ListBlueprints(context.Context, string, string, string) ([]v1beta1.CellBlueprintDoc, error)
- func (FakeClient) ListCells(context.Context, string, string, string) ([]v1beta1.CellDoc, error)
- func (FakeClient) ListConfigs(context.Context, string, string, string) ([]v1beta1.CellConfigDoc, error)
- func (FakeClient) ListContainers(context.Context, string, string, string, string) ([]v1beta1.ContainerSpec, error)
- func (FakeClient) ListImages(context.Context, string) (ListImagesResult, error)
- func (FakeClient) ListRealms(context.Context) ([]v1beta1.RealmDoc, error)
- func (FakeClient) ListSecrets(context.Context, string, string, string, string) ([]v1beta1.SecretDoc, error)
- func (FakeClient) ListSpaces(context.Context, string) ([]v1beta1.SpaceDoc, error)
- func (FakeClient) ListStacks(context.Context, string, string) ([]v1beta1.StackDoc, error)
- func (FakeClient) ListVolumes(context.Context, string, string, string) ([]v1beta1.VolumeDoc, error)
- func (FakeClient) LogContainer(context.Context, v1beta1.ContainerDoc) (LogContainerResult, error)
- func (FakeClient) MaterializeCell(context.Context, v1beta1.CellDoc) (CreateCellResult, error)
- func (FakeClient) Ping(context.Context) error
- func (FakeClient) PingVersion(context.Context) (string, error)
- func (FakeClient) PreviewCellFromConfig(context.Context, CellFromConfigRequest) (PreviewCellFromConfigResult, error)
- func (FakeClient) PurgeCell(context.Context, v1beta1.CellDoc, bool, bool) (PurgeCellResult, error)
- func (FakeClient) PurgeRealm(context.Context, v1beta1.RealmDoc, bool, bool) (PurgeRealmResult, error)
- func (FakeClient) PurgeSpace(context.Context, v1beta1.SpaceDoc, bool, bool) (PurgeSpaceResult, error)
- func (FakeClient) PurgeStack(context.Context, v1beta1.StackDoc, bool, bool) (PurgeStackResult, error)
- func (FakeClient) RefreshAll(context.Context) (RefreshAllResult, error)
- func (FakeClient) StartCell(context.Context, v1beta1.CellDoc) (StartCellResult, error)
- func (FakeClient) StopCell(context.Context, v1beta1.CellDoc) (StopCellResult, error)
- type GetBlueprintArgs
- type GetBlueprintReply
- type GetBlueprintResult
- type GetCellArgs
- type GetCellReply
- type GetCellResult
- type GetCgroupDetailArgs
- type GetCgroupDetailReply
- type GetCgroupDetailResult
- type GetConfigArgs
- type GetConfigReply
- type GetConfigResult
- type GetContainerArgs
- type GetContainerReply
- type GetContainerResult
- type GetImageArgs
- type GetImageReply
- type GetImageResult
- type GetNetworkDetailArgs
- type GetNetworkDetailReply
- type GetNetworkDetailResult
- type GetRealmArgs
- type GetRealmReply
- type GetRealmResult
- type GetSecretArgs
- type GetSecretReply
- type GetSecretResult
- type GetSpaceArgs
- type GetSpaceReply
- type GetSpaceResult
- type GetStackArgs
- type GetStackReply
- type GetStackResult
- type GetVolumeArgs
- type GetVolumeReply
- type GetVolumeResult
- type ImageInfo
- type KillCellArgs
- type KillCellReply
- type KillCellResult
- type ListBlueprintsArgs
- type ListBlueprintsReply
- type ListCellsArgs
- type ListCellsReply
- type ListConfigsArgs
- type ListConfigsReply
- type ListContainersArgs
- type ListContainersReply
- type ListImagesArgs
- type ListImagesReply
- type ListImagesResult
- type ListRealmsArgs
- type ListRealmsReply
- type ListSecretsArgs
- type ListSecretsReply
- type ListSpacesArgs
- type ListSpacesReply
- type ListStacksArgs
- type ListStacksReply
- type ListVolumesArgs
- type ListVolumesReply
- type LoadImageResult
- type LogContainerArgs
- type LogContainerReply
- type LogContainerResult
- type MaterializeCellArgs
- type MaterializeCellReply
- type NetworkEgress
- type NetworkEgressRule
- type NetworkScope
- type PingArgs
- type PingReply
- type PreviewCellFromConfigArgs
- type PreviewCellFromConfigReply
- type PreviewCellFromConfigResult
- type PruneImagesResult
- type PurgeCellArgs
- type PurgeCellReply
- type PurgeCellResult
- type PurgeRealmArgs
- type PurgeRealmReply
- type PurgeRealmResult
- type PurgeSpaceArgs
- type PurgeSpaceReply
- type PurgeSpaceResult
- type PurgeStackArgs
- type PurgeStackReply
- type PurgeStackResult
- type RefreshAllArgs
- type RefreshAllReply
- type RefreshAllResult
- type SpaceNetworkDetail
- type StartCellArgs
- type StartCellReply
- type StartCellResult
- type StopCellArgs
- type StopCellReply
- type StopCellResult
- type UnixClient
- func (c *UnixClient) ApplyDocuments(ctx context.Context, rawYAML []byte) (ApplyDocumentsResult, error)
- func (c *UnixClient) ApplyDocumentsForTeam(ctx context.Context, rawYAML []byte, team string) (ApplyDocumentsResult, error)
- func (c *UnixClient) AttachContainer(ctx context.Context, doc v1beta1.ContainerDoc) (AttachContainerResult, error)
- func (c *UnixClient) Close() error
- func (c *UnixClient) CreateCell(ctx context.Context, doc v1beta1.CellDoc) (CreateCellResult, error)
- func (c *UnixClient) CreateCellFromConfig(ctx context.Context, req CellFromConfigRequest) (CreateCellFromConfigResult, error)
- func (c *UnixClient) CreateConfig(ctx context.Context, doc v1beta1.CellConfigDoc) (CreateConfigResult, error)
- func (c *UnixClient) CreateRealm(ctx context.Context, doc v1beta1.RealmDoc) (CreateRealmResult, error)
- func (c *UnixClient) CreateSecret(ctx context.Context, doc v1beta1.SecretDoc) (CreateSecretResult, error)
- func (c *UnixClient) CreateSpace(ctx context.Context, doc v1beta1.SpaceDoc) (CreateSpaceResult, error)
- func (c *UnixClient) CreateStack(ctx context.Context, doc v1beta1.StackDoc) (CreateStackResult, error)
- func (c *UnixClient) CreateVolume(ctx context.Context, doc v1beta1.VolumeDoc) (CreateVolumeResult, error)
- func (c *UnixClient) DeleteBlueprint(ctx context.Context, doc v1beta1.CellBlueprintDoc) (DeleteBlueprintResult, error)
- func (c *UnixClient) DeleteCell(ctx context.Context, doc v1beta1.CellDoc) (DeleteCellResult, error)
- func (c *UnixClient) DeleteConfig(ctx context.Context, doc v1beta1.CellConfigDoc) (DeleteConfigResult, error)
- func (c *UnixClient) DeleteDocuments(ctx context.Context, rawYAML []byte, cascade, force bool) (DeleteDocumentsResult, error)
- func (c *UnixClient) DeleteRealm(ctx context.Context, doc v1beta1.RealmDoc, force, cascade bool) (DeleteRealmResult, error)
- func (c *UnixClient) DeleteSecret(ctx context.Context, doc v1beta1.SecretDoc) (DeleteSecretResult, error)
- func (c *UnixClient) DeleteSpace(ctx context.Context, doc v1beta1.SpaceDoc, force, cascade bool) (DeleteSpaceResult, error)
- func (c *UnixClient) DeleteStack(ctx context.Context, doc v1beta1.StackDoc, force, cascade bool) (DeleteStackResult, error)
- func (c *UnixClient) DeleteVolume(ctx context.Context, doc v1beta1.VolumeDoc) (DeleteVolumeResult, error)
- func (c *UnixClient) GetBlueprint(ctx context.Context, doc v1beta1.CellBlueprintDoc) (GetBlueprintResult, error)
- func (c *UnixClient) GetCell(ctx context.Context, doc v1beta1.CellDoc) (GetCellResult, error)
- func (c *UnixClient) GetCgroupDetail(ctx context.Context, scope CgroupScope) (GetCgroupDetailResult, error)
- func (c *UnixClient) GetConfig(ctx context.Context, doc v1beta1.CellConfigDoc) (GetConfigResult, error)
- func (c *UnixClient) GetContainer(ctx context.Context, doc v1beta1.ContainerDoc) (GetContainerResult, error)
- func (c *UnixClient) GetImage(ctx context.Context, realm, ref string) (GetImageResult, error)
- func (c *UnixClient) GetNetworkDetail(ctx context.Context, scope NetworkScope) (GetNetworkDetailResult, error)
- func (c *UnixClient) GetRealm(ctx context.Context, doc v1beta1.RealmDoc) (GetRealmResult, error)
- func (c *UnixClient) GetSecret(ctx context.Context, doc v1beta1.SecretDoc) (GetSecretResult, error)
- func (c *UnixClient) GetSpace(ctx context.Context, doc v1beta1.SpaceDoc) (GetSpaceResult, error)
- func (c *UnixClient) GetStack(ctx context.Context, doc v1beta1.StackDoc) (GetStackResult, error)
- func (c *UnixClient) GetVolume(ctx context.Context, doc v1beta1.VolumeDoc) (GetVolumeResult, error)
- func (c *UnixClient) KillCell(ctx context.Context, doc v1beta1.CellDoc) (KillCellResult, error)
- func (c *UnixClient) ListBlueprints(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellBlueprintDoc, error)
- func (c *UnixClient) ListCells(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellDoc, error)
- func (c *UnixClient) ListConfigs(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellConfigDoc, error)
- func (c *UnixClient) ListContainers(ctx context.Context, realmName, spaceName, stackName, cellName string) ([]v1beta1.ContainerSpec, error)
- func (c *UnixClient) ListImages(ctx context.Context, realm string) (ListImagesResult, error)
- func (c *UnixClient) ListRealms(ctx context.Context) ([]v1beta1.RealmDoc, error)
- func (c *UnixClient) ListSecrets(ctx context.Context, realmName, spaceName, stackName, cellName string) ([]v1beta1.SecretDoc, error)
- func (c *UnixClient) ListSpaces(ctx context.Context, realmName string) ([]v1beta1.SpaceDoc, error)
- func (c *UnixClient) ListStacks(ctx context.Context, realmName, spaceName string) ([]v1beta1.StackDoc, error)
- func (c *UnixClient) ListVolumes(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.VolumeDoc, error)
- func (c *UnixClient) LogContainer(ctx context.Context, doc v1beta1.ContainerDoc) (LogContainerResult, error)
- func (c *UnixClient) MaterializeCell(ctx context.Context, doc v1beta1.CellDoc) (CreateCellResult, error)
- func (c *UnixClient) Ping(ctx context.Context) error
- func (c *UnixClient) PingVersion(ctx context.Context) (string, error)
- func (c *UnixClient) PreviewCellFromConfig(ctx context.Context, req CellFromConfigRequest) (PreviewCellFromConfigResult, error)
- func (c *UnixClient) PurgeCell(ctx context.Context, doc v1beta1.CellDoc, force, cascade bool) (PurgeCellResult, error)
- func (c *UnixClient) PurgeRealm(ctx context.Context, doc v1beta1.RealmDoc, force, cascade bool) (PurgeRealmResult, error)
- func (c *UnixClient) PurgeSpace(ctx context.Context, doc v1beta1.SpaceDoc, force, cascade bool) (PurgeSpaceResult, error)
- func (c *UnixClient) PurgeStack(ctx context.Context, doc v1beta1.StackDoc, force, cascade bool) (PurgeStackResult, error)
- func (c *UnixClient) RefreshAll(ctx context.Context) (RefreshAllResult, error)
- func (c *UnixClient) StartCell(ctx context.Context, doc v1beta1.CellDoc) (StartCellResult, error)
- func (c *UnixClient) StopCell(ctx context.Context, doc v1beta1.CellDoc) (StopCellResult, error)
- type UnixOption
Constants ¶
const ( MethodCreateRealm = ServiceName + ".CreateRealm" MethodCreateSpace = ServiceName + ".CreateSpace" MethodCreateStack = ServiceName + ".CreateStack" MethodCreateCell = ServiceName + ".CreateCell" MethodMaterializeCell = ServiceName + ".MaterializeCell" MethodPreviewCellFromConfig = ServiceName + ".PreviewCellFromConfig" MethodCreateCellFromConfig = ServiceName + ".CreateCellFromConfig" MethodCreateConfig = ServiceName + ".CreateConfig" MethodCreateSecret = ServiceName + ".CreateSecret" MethodCreateVolume = ServiceName + ".CreateVolume" MethodGetRealm = ServiceName + ".GetRealm" MethodGetSpace = ServiceName + ".GetSpace" MethodGetStack = ServiceName + ".GetStack" MethodGetCell = ServiceName + ".GetCell" MethodGetContainer = ServiceName + ".GetContainer" MethodGetSecret = ServiceName + ".GetSecret" MethodGetBlueprint = ServiceName + ".GetBlueprint" MethodGetConfig = ServiceName + ".GetConfig" MethodGetVolume = ServiceName + ".GetVolume" MethodGetCgroupDetail = ServiceName + ".GetCgroupDetail" MethodGetNetworkDetail = ServiceName + ".GetNetworkDetail" MethodListImages = ServiceName + ".ListImages" MethodGetImage = ServiceName + ".GetImage" MethodListRealms = ServiceName + ".ListRealms" MethodListSpaces = ServiceName + ".ListSpaces" MethodListStacks = ServiceName + ".ListStacks" MethodListCells = ServiceName + ".ListCells" MethodListContainers = ServiceName + ".ListContainers" MethodListSecrets = ServiceName + ".ListSecrets" MethodListBlueprints = ServiceName + ".ListBlueprints" MethodListConfigs = ServiceName + ".ListConfigs" MethodListVolumes = ServiceName + ".ListVolumes" MethodStartCell = ServiceName + ".StartCell" MethodAttachContainer = ServiceName + ".AttachContainer" MethodLogContainer = ServiceName + ".LogContainer" MethodStopCell = ServiceName + ".StopCell" MethodKillCell = ServiceName + ".KillCell" MethodDeleteRealm = ServiceName + ".DeleteRealm" MethodDeleteSpace = ServiceName + ".DeleteSpace" MethodDeleteStack = ServiceName + ".DeleteStack" MethodDeleteCell = ServiceName + ".DeleteCell" MethodDeleteSecret = ServiceName + ".DeleteSecret" MethodDeleteBlueprint = ServiceName + ".DeleteBlueprint" MethodDeleteConfig = ServiceName + ".DeleteConfig" MethodDeleteVolume = ServiceName + ".DeleteVolume" MethodPurgeRealm = ServiceName + ".PurgeRealm" MethodPurgeSpace = ServiceName + ".PurgeSpace" MethodPurgeStack = ServiceName + ".PurgeStack" MethodPurgeCell = ServiceName + ".PurgeCell" MethodRefreshAll = ServiceName + ".RefreshAll" MethodApplyDocuments = ServiceName + ".ApplyDocuments" MethodDeleteDocuments = ServiceName + ".DeleteDocuments" MethodPing = ServiceName + ".Ping" )
Fully-qualified method names used on the wire.
const ( CgroupKindRealm = "realm" CgroupKindSpace = "space" CgroupKindStack = "stack" CgroupKindCell = "cell" CgroupKindContainer = "container" )
Cgroup scope kinds accepted by GetCgroupDetail.
const ( CgroupValueSet = "set" CgroupValueMax = "max" CgroupValueAbsent = "absent" CgroupValueUnreadable = "unreadable" )
CgroupValue states. A value the kernel does not report is never collapsed to 0: an absent interface file is CgroupValueAbsent, a kernel "max" is CgroupValueMax, and a read failure other than "not found" is CgroupValueUnreadable.
const ( CgroupSourceContainer = "container" CgroupSourceSpaceDefault = "space-default" CgroupSourceUnset = "unset" )
Declared resource sources for a container's spec.resources fields.
const ( NetworkKindSpace = "space" NetworkKindCell = "cell" NetworkKindContainer = "container" )
Network scope kinds accepted by GetNetworkDetail. Realms and stacks carry no networking fields, so they have no network scope.
const ( NetworkSubnetAllocator = "allocator" NetworkSubnetConflist = "conflist" NetworkSubnetUnallocated = "unallocated" )
Space subnet sources. NetworkSubnetUnallocated means neither an allocator state file nor a conflist subnet exists yet.
const ( NetworkSourceSpec = "spec" NetworkSourceDefault = "default" NetworkSourceSpace = "space" NetworkSourceContainer = "container" )
Sources for a value that may be set on the resource itself or fall back.
const ( NetworkIPv4Assigned = "assigned" NetworkIPv4NotRunning = "not-running" NetworkIPv4HostNetwork = "host-network" NetworkIPv4NotAssigned = "not-assigned" )
Cell IPv4 states. NetworkIPv4NotRunning means the root container's task is not running; NetworkIPv4HostNetwork means the cell shares the host netns and has no CNI attachment; NetworkIPv4NotAssigned means the task runs but no CNI result is cached.
const ServiceName = "KukeonV1"
ServiceName is the net/rpc service name registered by the daemon. The "V1" suffix is the wire version prefix; breaking changes land on "KukeonV2".
Variables ¶
var ErrUnexpectedCall = errors.New("unexpected kukeonv1 client call")
ErrUnexpectedCall is returned by FakeClient methods that have not been overridden by the test. Tests that want to assert "this method was not called" can match on errors.Is(err, ErrUnexpectedCall).
var ErrUnsupportedScheme = errors.New("unsupported kukeon host scheme")
ErrUnsupportedScheme is returned by Dial when the address scheme cannot be served by any compiled-in transport.
Functions ¶
func FromAPIError ¶
FromAPIError reconstructs a Go error that unwraps to the matching errdefs sentinel when the Kind is recognized, so callers can use errors.Is. The error's Error() returns the verbatim wire Message (no prefix added): the server already embeds the sentinel in the message via %w wrapping, and we don't want to stutter "failed to X: failed to X: ...".
func KindFromError ¶
KindFromError inspects err and returns the best-matching wire Kind, falling back to "Unknown" when nothing registered matches.
Types ¶
type APIError ¶
APIError is a serializable error. Kind identifies the error class; client code maps it back to a local sentinel so that errors.Is keeps working across the wire.
func ToAPIError ¶
ToAPIError converts a Go error into a wire APIError. Returns nil for nil.
type ApplyDocumentsArgs ¶
ApplyDocumentsArgs carries a raw multi-document YAML blob. The server parses and validates; validation errors are returned in the Reply.Err.
Team, when non-empty, switches the apply into per-team prune mode (issue #1027): every applied CellBlueprint / CellConfig has its `metadata.labels[kukeon.io/team]` set to Team before persistence, and after the apply loop the daemon enumerates daemon-stored Blueprint / Config objects carrying `kukeon.io/team=<Team>` and deletes those not in the applied set. The empty-string default preserves the historical no-team, no-prune `kuke apply -f` behavior.
type ApplyDocumentsReply ¶
type ApplyDocumentsReply struct {
Result ApplyDocumentsResult
Err *APIError
}
type ApplyDocumentsResult ¶
type ApplyDocumentsResult struct {
Resources []ApplyResourceResult
}
type ApplyResourceResult ¶
type ApplyResourceResult struct {
Index int `json:"index" yaml:"index"`
Kind string `json:"kind" yaml:"kind"`
Name string `json:"name" yaml:"name"`
Action string `json:"action" yaml:"action"`
Error string `json:"error,omitempty" yaml:"error,omitempty"`
Changes []string `json:"changes,omitempty" yaml:"changes,omitempty"`
Details map[string]string `json:"details,omitempty" yaml:"details,omitempty"`
}
ApplyResourceResult is the per-resource outcome of an ApplyDocuments call. JSON/YAML tags preserve the lowercase `kuke apply -f -o json` shape that matches the sibling `kuke delete -f -o json` contract on DeleteResourceResult (the wire is gob and ignores these tags).
type AttachContainerArgs ¶ added in v0.2.0
type AttachContainerArgs struct {
Doc v1beta1.ContainerDoc
}
AttachContainerArgs identifies the target container for an attach request.
type AttachContainerReply ¶ added in v0.2.0
type AttachContainerReply struct {
Result AttachContainerResult
Err *APIError
}
type AttachContainerResult ¶ added in v0.2.0
type AttachContainerResult struct {
// HostSocketPath is the host path of the per-container sbsh terminal
// socket. Inside the container the same inode is reachable at
// /run/kukeon/tty/socket via the tty directory bind mount. Returned only
// when the target container has Attachable=true and its task is Running;
// the daemon errors with ErrAttachNotSupported when the target is not
// Attachable, or ErrAttachTaskNotRunning when the task is not Running.
HostSocketPath string
}
AttachContainerResult carries the host-side coordinates the `kuke attach` client needs to drive the sbsh terminal. Bytes never traverse this RPC — the client opens HostSocketPath directly.
type CellFromConfigRequest ¶ added in v0.10.0
type CellFromConfigRequest struct {
// Config locates the CellConfig: name plus the scope it is stored in.
Config v1beta1.CellConfigMetadata
// Name is the explicit cell name; empty allocates <prefix>-<6hex>.
Name string
// EnvOverrides are per-cell `--env KEY=VALUE` overrides.
EnvOverrides []string
// AutoDelete marks the cell for deletion when its attach session ends.
AutoDelete bool
// IgnoreDiskPressure bypasses the create-time disk-pressure guard.
IgnoreDiskPressure bool
// Start starts the cell after creating it.
Start bool
// ExpectedDigest pins the digest of an earlier preview.
ExpectedDigest string
}
CellFromConfigRequest names the stored CellConfig a daemon-side render reads, plus the per-cell inputs the caller supplies (#1418).
type CellNetworkDetail ¶ added in v0.10.0
type CellNetworkDetail struct {
BridgeName string `json:"bridgeName,omitempty"`
HostNetwork bool `json:"hostNetwork"`
IPv4 string `json:"ipv4,omitempty"`
IPv4State string `json:"ipv4State"`
RootContainer string `json:"rootContainer,omitempty"`
Containers []ContainerNetworkSummary `json:"containers,omitempty"`
}
CellNetworkDetail is a cell's bridge, IPv4 and network mode. HostNetwork is true when any container sets hostNetwork, the same rule the runner uses to put the root container (and so the whole cell) on the host netns.
type CgroupCPU ¶ added in v0.10.0
type CgroupCPU struct {
Max CgroupCPUMax `json:"max"`
Weight CgroupValue `json:"weight"`
UsageUsec CgroupValue `json:"usageUsec"`
UserUsec CgroupValue `json:"userUsec"`
SystemUsec CgroupValue `json:"systemUsec"`
}
type CgroupCPUMax ¶ added in v0.10.0
type CgroupCPUMax struct {
State string `json:"state"`
Raw string `json:"raw,omitempty"`
QuotaMicros *int64 `json:"quotaMicros,omitempty"`
PeriodMicros *int64 `json:"periodMicros,omitempty"`
}
CgroupCPUMax is cpu.max. QuotaMicros is nil when the quota is "max".
type CgroupDeclaredResource ¶ added in v0.10.0
type CgroupDeclaredResource struct {
Field string `json:"field"`
Value *int64 `json:"value,omitempty"`
Source string `json:"source"`
}
CgroupDeclaredResource is one container spec.resources field and where its value came from.
type CgroupIOMax ¶ added in v0.10.0
type CgroupIOMax struct {
State string `json:"state"`
Entries []CgroupIOMaxEntry `json:"entries,omitempty"`
}
CgroupIOMax is io.max. An empty Entries with State CgroupValueSet means the file exists but no device carries a limit.
type CgroupIOMaxEntry ¶ added in v0.10.0
type CgroupIOMaxEntry struct {
Device string `json:"device"`
Limits map[string]string `json:"limits"`
}
CgroupIOMaxEntry is one device line of io.max.
type CgroupList ¶ added in v0.10.0
CgroupList is a whitespace-separated interface file such as cgroup.controllers.
type CgroupLive ¶ added in v0.10.0
type CgroupLive struct {
Controllers CgroupList `json:"controllers"`
SubtreeControl CgroupList `json:"subtreeControl"`
Populated CgroupValue `json:"populated"`
Memory CgroupMemory `json:"memory"`
CPU CgroupCPU `json:"cpu"`
Pids CgroupPids `json:"pids"`
IO CgroupIOMax `json:"io"`
}
CgroupLive carries the point-in-time values kukeond read from the cgroup's interface files.
type CgroupMemory ¶ added in v0.10.0
type CgroupMemory struct {
Max CgroupValue `json:"max"`
High CgroupValue `json:"high"`
SwapMax CgroupValue `json:"swapMax"`
Current CgroupValue `json:"current"`
Peak CgroupValue `json:"peak"`
OOM CgroupValue `json:"oom"`
OOMKill CgroupValue `json:"oomKill"`
}
type CgroupPids ¶ added in v0.10.0
type CgroupPids struct {
Max CgroupValue `json:"max"`
Current CgroupValue `json:"current"`
}
type CgroupScope ¶ added in v0.10.0
type CgroupScope struct {
Kind string `json:"kind"`
Realm string `json:"realm"`
Space string `json:"space,omitempty"`
Stack string `json:"stack,omitempty"`
Cell string `json:"cell,omitempty"`
Container string `json:"container,omitempty"`
}
CgroupScope names the realm, space, stack, cell or container whose cgroup GetCgroupDetail reads. Kind selects which coordinates are required.
type CgroupValue ¶ added in v0.10.0
type CgroupValue struct {
State string `json:"state"`
Raw string `json:"raw,omitempty"`
Value *int64 `json:"value,omitempty"`
}
CgroupValue is one cgroup v2 interface value. Raw is the trimmed file (or key) content; Value is set only when State is CgroupValueSet and Raw parses as an integer.
type Client ¶
type Client interface {
io.Closer
CreateRealm(ctx context.Context, doc v1beta1.RealmDoc) (CreateRealmResult, error)
CreateSpace(ctx context.Context, doc v1beta1.SpaceDoc) (CreateSpaceResult, error)
CreateStack(ctx context.Context, doc v1beta1.StackDoc) (CreateStackResult, error)
CreateCell(ctx context.Context, doc v1beta1.CellDoc) (CreateCellResult, error)
// MaterializeCell creates a cell record (or ensures an existing cell's
// resources exist) without starting any container tasks (#818). The
// resulting cell is left stopped; the operator runs `kuke start <name>`
// to start it. Distinct from CreateCell (which always starts) — used by
// `kuke create cell --from-blueprint` / `--from-config` for the
// materialise-but-don't-start scaffolding modes. Result shape matches
// CreateCell so the same printer renders the outcome (Started will be
// false because the start step was skipped).
MaterializeCell(ctx context.Context, doc v1beta1.CellDoc) (CreateCellResult, error)
// PreviewCellFromConfig renders the cell a stored CellConfig would
// create — Realm → Space → Stack defaults merged under the Config's own
// fill, realm images resolved — and returns it with its digest and the
// origin of every merged value, without writing anything (#1418). The
// daemon is the only CellConfig renderer.
PreviewCellFromConfig(ctx context.Context, req CellFromConfigRequest) (PreviewCellFromConfigResult, error)
// CreateCellFromConfig renders a cell from a stored CellConfig and creates
// it, started (req.Start) or stopped (#1418). A non-empty
// req.ExpectedDigest refuses the create unless the fresh render matches
// it (errdefs.ErrRenderDigestMismatch).
CreateCellFromConfig(ctx context.Context, req CellFromConfigRequest) (CreateCellFromConfigResult, error)
// CreateConfig atomically persists a new CellConfig document under
// create-only semantics (issue #839): the daemon-side write fails with
// errdefs.ErrConfigExists if a Config of the same name already lives in
// scope. This is the create-or-fail sibling of ApplyDocuments — used by
// `kuke create config` and any future client that needs "first writer
// wins" rather than the write-through apply path. The same scope /
// blueprint / slot-fill validation as ApplyDocuments runs first — the
// only difference is the atomic gate (which ApplyDocuments doesn't need,
// since apply is intentionally write-through).
CreateConfig(ctx context.Context, doc v1beta1.CellConfigDoc) (CreateConfigResult, error)
// CreateSecret persists a new Secret document to daemon storage. The
// write is create-or-overwrite (the daemon's runner.WriteSecret is
// write-through). The resulting SecretDoc is metadata-only (Spec.Data
// is never echoed back).
CreateSecret(ctx context.Context, doc v1beta1.SecretDoc) (CreateSecretResult, error)
// CreateVolume provisions a new Volume's daemon-managed directory (issue
// #1236). The write is idempotent (the daemon's runner.WriteVolume re-
// asserts the directory mode/owner), and the resulting VolumeDoc is
// metadata-only. A Volume is never cell-scoped, so the doc carries
// realm/space/stack coordinates only — cell scope is unrepresentable.
CreateVolume(ctx context.Context, doc v1beta1.VolumeDoc) (CreateVolumeResult, error)
GetRealm(ctx context.Context, doc v1beta1.RealmDoc) (GetRealmResult, error)
GetSpace(ctx context.Context, doc v1beta1.SpaceDoc) (GetSpaceResult, error)
GetStack(ctx context.Context, doc v1beta1.StackDoc) (GetStackResult, error)
GetCell(ctx context.Context, doc v1beta1.CellDoc) (GetCellResult, error)
GetContainer(ctx context.Context, doc v1beta1.ContainerDoc) (GetContainerResult, error)
// GetCgroupDetail reads one realm, space, stack, cell or container
// cgroup's declared configuration plus its live cgroup v2 interface
// values (issue #1410). Read-only; callers never touch /sys/fs/cgroup.
GetCgroupDetail(ctx context.Context, scope CgroupScope) (GetCgroupDetailResult, error)
// GetNetworkDetail reads one space, cell or container's declared
// networking plus the runtime facts kukeond knows: subnet, bridge,
// conflist presence and the cell IPv4 (issue #1411). Read-only.
GetNetworkDetail(ctx context.Context, scope NetworkScope) (GetNetworkDetailResult, error)
// ListImages and GetImage read a realm's containerd image inventory
// (issue #1406). Read-only and served over RPC only so `kuke serve`
// can browse images through kukeond; the `kuke image *` / `kuke get
// image` CLI paths stay daemon-independent and in-process (#226).
ListImages(ctx context.Context, realm string) (ListImagesResult, error)
GetImage(ctx context.Context, realm, ref string) (GetImageResult, error)
// GetSecret reports the metadata-only view of a single named, scoped
// `kind: Secret` (issue #622). Spec.data is never echoed — the bytes do
// not traverse this RPC by design (#619).
GetSecret(ctx context.Context, doc v1beta1.SecretDoc) (GetSecretResult, error)
// GetBlueprint reads one named, scoped `kind: CellBlueprint`'s full
// document from daemon storage (issue #620). Unlike GetSecret the whole
// document is returned — a blueprint carries only template references —
// so `kuke run -b` can materialize it. The input doc carries the name and
// scope coordinates only; the spec is ignored.
GetBlueprint(ctx context.Context, doc v1beta1.CellBlueprintDoc) (GetBlueprintResult, error)
// GetVolume reports the metadata-only view of a single named, scoped
// `kind: Volume` (issue #1236). A Volume carries no body, so only its
// scope coordinates and name are returned.
GetVolume(ctx context.Context, doc v1beta1.VolumeDoc) (GetVolumeResult, error)
// GetConfig reads one named, scoped `kind: CellConfig`'s full document
// from daemon storage (issue #644). Like GetBlueprint the whole document
// is returned — a Config carries no credential bytes — so the blueprint
// ref, values, and slot fills surface to `kuke get config`. The input doc
// carries the name and scope coordinates only; the spec is ignored.
GetConfig(ctx context.Context, doc v1beta1.CellConfigDoc) (GetConfigResult, error)
ListRealms(ctx context.Context) ([]v1beta1.RealmDoc, error)
ListSpaces(ctx context.Context, realmName string) ([]v1beta1.SpaceDoc, error)
ListStacks(ctx context.Context, realmName, spaceName string) ([]v1beta1.StackDoc, error)
ListCells(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellDoc, error)
ListContainers(
ctx context.Context,
realmName, spaceName, stackName, cellName string,
) ([]v1beta1.ContainerSpec, error)
// ListSecrets enumerates the metadata of every Secret bound to the
// filter scope or any scope nested within it (issue #622). An empty
// realmName lists across all realms. spec.data is never echoed.
ListSecrets(ctx context.Context, realmName, spaceName, stackName, cellName string) ([]v1beta1.SecretDoc, error)
// ListBlueprints enumerates the metadata of every CellBlueprint bound to
// the filter scope or any scope nested within it (issue #643). An empty
// realmName lists across all realms. A Blueprint is never cell-scoped, so
// there is no cell coordinate. The spec is not populated for a list.
ListBlueprints(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellBlueprintDoc, error)
// ListVolumes enumerates the metadata of every Volume bound to the filter
// scope or any scope nested within it (issue #1236). An empty realmName
// lists across all realms. A Volume is never cell-scoped, so there is no
// cell coordinate.
ListVolumes(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.VolumeDoc, error)
// ListConfigs enumerates the metadata of every CellConfig bound to the
// filter scope or any scope nested within it (issue #644). An empty
// realmName lists across all realms. A Config is never cell-scoped, so
// there is no cell coordinate. The spec is not populated for a list.
ListConfigs(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellConfigDoc, error)
StartCell(ctx context.Context, doc v1beta1.CellDoc) (StartCellResult, error)
// AttachContainer is the placeholder endpoint shipped in #57. It only
// validates that the target container has Attachable=true; the
// terminal-bridge client lands in #66.
AttachContainer(ctx context.Context, doc v1beta1.ContainerDoc) (AttachContainerResult, error)
// LogContainer validates that the target container has Attachable=true
// and resolves the host-side path of the per-container sbsh capture
// file. Bytes never traverse this RPC — the caller (`kuke log`) reads
// the file directly. Same Attachable gate as AttachContainer: only
// containers wrapped by sbsh have a capture file to surface.
LogContainer(ctx context.Context, doc v1beta1.ContainerDoc) (LogContainerResult, error)
StopCell(ctx context.Context, doc v1beta1.CellDoc) (StopCellResult, error)
KillCell(ctx context.Context, doc v1beta1.CellDoc) (KillCellResult, error)
DeleteRealm(ctx context.Context, doc v1beta1.RealmDoc, force, cascade bool) (DeleteRealmResult, error)
DeleteSpace(ctx context.Context, doc v1beta1.SpaceDoc, force, cascade bool) (DeleteSpaceResult, error)
DeleteStack(ctx context.Context, doc v1beta1.StackDoc, force, cascade bool) (DeleteStackResult, error)
DeleteCell(ctx context.Context, doc v1beta1.CellDoc) (DeleteCellResult, error)
// DeleteSecret removes a single named, scoped Secret's daemon-stored
// file (issue #622). The live-reference safety gate ships in phase 3c.
DeleteSecret(ctx context.Context, doc v1beta1.SecretDoc) (DeleteSecretResult, error)
// DeleteBlueprint removes a single named, scoped CellBlueprint's
// daemon-stored document (issue #643). No live-reference gate: cells
// materialized from a blueprint are independent copies (#620).
DeleteBlueprint(ctx context.Context, doc v1beta1.CellBlueprintDoc) (DeleteBlueprintResult, error)
// DeleteVolume removes a single named, scoped Volume's daemon-provisioned
// directory (issue #1236). No live-mount gate yet: the container-side mount
// kind that would reference a Volume lands in step 4 (#1016), where the
// delete gate against a live mount is exercised.
DeleteVolume(ctx context.Context, doc v1beta1.VolumeDoc) (DeleteVolumeResult, error)
// DeleteConfig removes a single named, scoped CellConfig's daemon-stored
// document (issue #644). No live-reference gate: deleting a Config never
// deletes the cell it materialized. The result reports any live cells that
// still carry the back-reference label so the caller can emit a notice.
DeleteConfig(ctx context.Context, doc v1beta1.CellConfigDoc) (DeleteConfigResult, error)
PurgeRealm(ctx context.Context, doc v1beta1.RealmDoc, force, cascade bool) (PurgeRealmResult, error)
PurgeSpace(ctx context.Context, doc v1beta1.SpaceDoc, force, cascade bool) (PurgeSpaceResult, error)
PurgeStack(ctx context.Context, doc v1beta1.StackDoc, force, cascade bool) (PurgeStackResult, error)
PurgeCell(ctx context.Context, doc v1beta1.CellDoc, force, cascade bool) (PurgeCellResult, error)
RefreshAll(ctx context.Context) (RefreshAllResult, error)
ApplyDocuments(ctx context.Context, rawYAML []byte) (ApplyDocumentsResult, error)
// ApplyDocumentsForTeam is the per-team prune-apply sibling of
// ApplyDocuments (issue #1027). It stamps every applied CellBlueprint /
// CellConfig with `kukeon.io/team=<team>` and, after the apply loop,
// deletes daemon-stored Blueprint / Config objects carrying the same
// team label that the applied set did not include. Used by `kuke team
// init` (#796) to make project rosters converge: re-running on a
// shrunken roster prunes the orphans without touching other teams or
// running cells (deleting a Blueprint or Config never deletes the cell
// materialized from it). Empty team is rejected — use ApplyDocuments
// for the no-team path.
ApplyDocumentsForTeam(ctx context.Context, rawYAML []byte, team string) (ApplyDocumentsResult, error)
// DeleteDocuments is the file-driven counterpart to ApplyDocuments —
// `kuke delete -f` sends the raw YAML over the wire so deletes honor
// `--host` routing the same way applies do. Per-resource cascade/force
// semantics match the single-kind Delete{Realm,Space,Stack} methods.
DeleteDocuments(ctx context.Context, rawYAML []byte, cascade, force bool) (DeleteDocumentsResult, error)
Ping(ctx context.Context) error
// PingVersion is the Ping sibling that surfaces the daemon's reported
// build version alongside the ack. `kuke status` uses it to render the
// daemon row; the in-process client returns the current process's
// version (config.Version), so the value is well-defined on both
// transports. New callers preferring the existing ack-only contract
// stay on Ping.
PingVersion(ctx context.Context) (string, error)
}
Client is the transport-agnostic interface for programmatic access to kukeon primitives. All wire types are drawn from pkg/api/model/v1beta1.
type ContainerNetworkDetail ¶ added in v0.10.0
type ContainerNetworkDetail struct {
ID string `json:"id"`
Root bool `json:"root"`
HostNetwork bool `json:"hostNetwork"`
HostPID bool `json:"hostPID"`
CNIConfigPath string `json:"cniConfigPath"`
CNIConfigPathSource string `json:"cniConfigPathSource"`
Ports []string `json:"ports,omitempty"`
Networks []string `json:"networks,omitempty"`
NetworksAliases []string `json:"networksAliases,omitempty"`
}
ContainerNetworkDetail is a container's declared network spec. Ports, Networks and NetworksAliases are stored but not applied at runtime yet (#1002).
type ContainerNetworkSummary ¶ added in v0.10.0
type ContainerNetworkSummary struct {
ID string `json:"id"`
Root bool `json:"root"`
HostNetwork bool `json:"hostNetwork"`
HostPID bool `json:"hostPID"`
Ports []string `json:"ports,omitempty"`
}
ContainerNetworkSummary is one container's network-relevant spec fields.
type CreateCellArgs ¶
CreateCellArgs is the wire request for CreateCell.
type CreateCellFromConfigArgs ¶ added in v0.10.0
type CreateCellFromConfigArgs struct {
Request CellFromConfigRequest
}
CreateCellFromConfigArgs is the wire request for CreateCellFromConfig.
type CreateCellFromConfigReply ¶ added in v0.10.0
type CreateCellFromConfigReply struct {
Result CreateCellFromConfigResult
Err *APIError
}
CreateCellFromConfigReply is the wire response for CreateCellFromConfig.
type CreateCellFromConfigResult ¶ added in v0.10.0
type CreateCellFromConfigResult struct {
CreateCellResult
Digest string
Values []v1beta1.RenderedValue
}
CreateCellFromConfigResult is the create outcome plus the render's digest and merge explanation.
type CreateCellReply ¶
type CreateCellReply struct {
Result CreateCellResult
Err *APIError
}
CreateCellReply is the wire response for CreateCell. Err is non-nil on failure so structured errdefs.* sentinels survive the wire roundtrip.
type CreateCellResult ¶
type CreateCellResult struct {
Cell v1beta1.CellDoc
MetadataExistsPre bool
MetadataExistsPost bool
CgroupExistsPre bool
CgroupExistsPost bool
CgroupCreated bool
RootContainerExistsPre bool
RootContainerExistsPost bool
RootContainerCreated bool
StartedPre bool
StartedPost bool
Started bool
Created bool
Containers []ContainerCreationOutcome
}
CreateCellResult mirrors internal/controller.CreateCellResult using external v1beta1 types, so it is safe to serialize and return to non-privileged callers.
type CreateConfigArgs ¶ added in v0.6.0
type CreateConfigArgs struct {
Doc v1beta1.CellConfigDoc
}
CreateConfigArgs is the wire request for CreateConfig (issue #839). The document carries the candidate CellConfig the daemon writes atomically.
type CreateConfigReply ¶ added in v0.6.0
type CreateConfigReply struct {
Result CreateConfigResult
Err *APIError
}
CreateConfigReply is the wire response for CreateConfig. Err is non-nil on failure so the errdefs.ErrConfigExists sentinel survives the wire roundtrip — the CLI's gap-fill counter loop reads it to retry.
type CreateConfigResult ¶ added in v0.6.0
type CreateConfigResult struct {
Config v1beta1.CellConfigDoc
Created bool
}
CreateConfigResult reports the outcome of an atomic create-only CellConfig write (issue #839). Created mirrors the daemon-side flag; Config is the persisted document echoed back so the CLI can chain into the cell-start path without re-issuing GetConfig.
type CreateRealmArgs ¶
type CreateRealmReply ¶
type CreateRealmReply struct {
Result CreateRealmResult
Err *APIError
}
type CreateRealmResult ¶
type CreateSecretArgs ¶ added in v0.6.0
CreateSecretArgs is the wire request for CreateSecret.
type CreateSecretReply ¶ added in v0.6.0
type CreateSecretReply struct {
Result CreateSecretResult
Err *APIError
}
CreateSecretReply is the wire response for CreateSecret.
type CreateSecretResult ¶ added in v0.6.0
CreateSecretResult reports the outcome of a Secret write.
type CreateSpaceArgs ¶
type CreateSpaceReply ¶
type CreateSpaceReply struct {
Result CreateSpaceResult
Err *APIError
}
type CreateSpaceResult ¶
type CreateStackArgs ¶
type CreateStackReply ¶
type CreateStackReply struct {
Result CreateStackResult
Err *APIError
}
type CreateStackResult ¶
type CreateVolumeArgs ¶ added in v0.8.0
CreateVolumeArgs is the wire request for CreateVolume (issue #1236).
type CreateVolumeReply ¶ added in v0.8.0
type CreateVolumeReply struct {
Result CreateVolumeResult
Err *APIError
}
CreateVolumeReply is the wire response for CreateVolume.
type CreateVolumeResult ¶ added in v0.8.0
CreateVolumeResult reports the outcome of provisioning a Volume's directory.
type DeleteBlueprintArgs ¶ added in v0.6.0
type DeleteBlueprintArgs struct {
Doc v1beta1.CellBlueprintDoc
}
type DeleteBlueprintReply ¶ added in v0.6.0
type DeleteBlueprintReply struct {
Result DeleteBlueprintResult
Err *APIError
}
type DeleteBlueprintResult ¶ added in v0.6.0
type DeleteBlueprintResult struct {
Blueprint v1beta1.CellBlueprintDoc
Deleted bool
}
DeleteBlueprintResult reports the removed Blueprint (metadata only) and whether the file existed to delete.
type DeleteCellArgs ¶
type DeleteCellReply ¶
type DeleteCellReply struct {
Result DeleteCellResult
Err *APIError
}
type DeleteCellResult ¶
type DeleteConfigArgs ¶ added in v0.6.0
type DeleteConfigArgs struct {
Doc v1beta1.CellConfigDoc
}
type DeleteConfigReply ¶ added in v0.6.0
type DeleteConfigReply struct {
Result DeleteConfigResult
Err *APIError
}
type DeleteConfigResult ¶ added in v0.6.0
type DeleteConfigResult struct {
Config v1beta1.CellConfigDoc
Deleted bool
BackRefCells []string
}
DeleteConfigResult reports the removed Config (metadata only), whether the file existed to delete, and the scope paths of any live cells that still carry the kukeon.io/config back-reference label (issue #644). BackRefCells is informational — deleting a Config never deletes the cell it materialized — so the CLI surfaces a one-line notice pointing at `kuke delete cell <name>`.
type DeleteDocumentsArgs ¶ added in v0.6.0
DeleteDocumentsArgs carries a raw multi-document YAML blob plus the same cascade/force flags exposed on `kuke delete -f`. The server parses and validates; validation errors are returned in the Reply.Err.
type DeleteDocumentsReply ¶ added in v0.6.0
type DeleteDocumentsReply struct {
Result DeleteDocumentsResult
Err *APIError
}
type DeleteDocumentsResult ¶ added in v0.6.0
type DeleteDocumentsResult struct {
Resources []DeleteResourceResult
}
type DeleteImageResult ¶ added in v0.3.0
DeleteImageResult reports the outcome of a `kuke image delete` removal.
type DeleteRealmReply ¶
type DeleteRealmReply struct {
Result DeleteRealmResult
Err *APIError
}
type DeleteRealmResult ¶
type DeleteResourceResult ¶ added in v0.6.0
type DeleteResourceResult struct {
Index int `json:"index" yaml:"index"`
Kind string `json:"kind" yaml:"kind"`
Name string `json:"name" yaml:"name"`
Action string `json:"action" yaml:"action"`
Error string `json:"error,omitempty" yaml:"error,omitempty"`
Cascaded []string `json:"cascaded,omitempty" yaml:"cascaded,omitempty"`
Details map[string]string `json:"details,omitempty" yaml:"details,omitempty"`
}
DeleteResourceResult is the per-resource outcome of a DeleteDocuments call. JSON/YAML tags preserve the lowercase `kuke delete -f -o json` shape that previously came from internal/controller.ResourceDeleteResult's custom marshalers (the wire is gob and ignores these tags).
type DeleteSecretArgs ¶ added in v0.6.0
type DeleteSecretReply ¶ added in v0.6.0
type DeleteSecretReply struct {
Result DeleteSecretResult
Err *APIError
}
type DeleteSecretResult ¶ added in v0.6.0
DeleteSecretResult reports the removed Secret (metadata only) and whether the file existed to delete.
type DeleteSpaceReply ¶
type DeleteSpaceReply struct {
Result DeleteSpaceResult
Err *APIError
}
type DeleteSpaceResult ¶
type DeleteStackReply ¶
type DeleteStackReply struct {
Result DeleteStackResult
Err *APIError
}
type DeleteStackResult ¶
type DeleteVolumeArgs ¶ added in v0.8.0
type DeleteVolumeReply ¶ added in v0.8.0
type DeleteVolumeReply struct {
Result DeleteVolumeResult
Err *APIError
}
type DeleteVolumeResult ¶ added in v0.8.0
DeleteVolumeResult reports the removed Volume (metadata only) and whether the directory existed to delete.
type FakeClient ¶
type FakeClient struct{}
FakeClient is a Client with every method returning ErrUnexpectedCall. Embed it into a per-test fake and override only the methods under test. Close() is a no-op so deferred client.Close() calls never fail.
func (FakeClient) ApplyDocuments ¶
func (FakeClient) ApplyDocuments(context.Context, []byte) (ApplyDocumentsResult, error)
func (FakeClient) ApplyDocumentsForTeam ¶ added in v0.6.0
func (FakeClient) ApplyDocumentsForTeam( context.Context, []byte, string, ) (ApplyDocumentsResult, error)
func (FakeClient) AttachContainer ¶ added in v0.2.0
func (FakeClient) AttachContainer(context.Context, v1beta1.ContainerDoc) (AttachContainerResult, error)
func (FakeClient) Close ¶
func (FakeClient) Close() error
func (FakeClient) CreateCell ¶
func (FakeClient) CreateCell(context.Context, v1beta1.CellDoc) (CreateCellResult, error)
func (FakeClient) CreateCellFromConfig ¶ added in v0.10.0
func (FakeClient) CreateCellFromConfig(context.Context, CellFromConfigRequest) (CreateCellFromConfigResult, error)
func (FakeClient) CreateConfig ¶ added in v0.6.0
func (FakeClient) CreateConfig(context.Context, v1beta1.CellConfigDoc) (CreateConfigResult, error)
func (FakeClient) CreateRealm ¶
func (FakeClient) CreateRealm(context.Context, v1beta1.RealmDoc) (CreateRealmResult, error)
func (FakeClient) CreateSecret ¶ added in v0.6.0
func (FakeClient) CreateSecret(context.Context, v1beta1.SecretDoc) (CreateSecretResult, error)
func (FakeClient) CreateSpace ¶
func (FakeClient) CreateSpace(context.Context, v1beta1.SpaceDoc) (CreateSpaceResult, error)
func (FakeClient) CreateStack ¶
func (FakeClient) CreateStack(context.Context, v1beta1.StackDoc) (CreateStackResult, error)
func (FakeClient) CreateVolume ¶ added in v0.8.0
func (FakeClient) CreateVolume(context.Context, v1beta1.VolumeDoc) (CreateVolumeResult, error)
func (FakeClient) DeleteBlueprint ¶ added in v0.6.0
func (FakeClient) DeleteBlueprint(context.Context, v1beta1.CellBlueprintDoc) (DeleteBlueprintResult, error)
func (FakeClient) DeleteCell ¶
func (FakeClient) DeleteCell(context.Context, v1beta1.CellDoc) (DeleteCellResult, error)
func (FakeClient) DeleteConfig ¶ added in v0.6.0
func (FakeClient) DeleteConfig(context.Context, v1beta1.CellConfigDoc) (DeleteConfigResult, error)
func (FakeClient) DeleteDocuments ¶ added in v0.6.0
func (FakeClient) DeleteDocuments(context.Context, []byte, bool, bool) (DeleteDocumentsResult, error)
func (FakeClient) DeleteRealm ¶
func (FakeClient) DeleteRealm(context.Context, v1beta1.RealmDoc, bool, bool) (DeleteRealmResult, error)
func (FakeClient) DeleteSecret ¶ added in v0.6.0
func (FakeClient) DeleteSecret(context.Context, v1beta1.SecretDoc) (DeleteSecretResult, error)
func (FakeClient) DeleteSpace ¶
func (FakeClient) DeleteSpace(context.Context, v1beta1.SpaceDoc, bool, bool) (DeleteSpaceResult, error)
func (FakeClient) DeleteStack ¶
func (FakeClient) DeleteStack(context.Context, v1beta1.StackDoc, bool, bool) (DeleteStackResult, error)
func (FakeClient) DeleteVolume ¶ added in v0.8.0
func (FakeClient) DeleteVolume(context.Context, v1beta1.VolumeDoc) (DeleteVolumeResult, error)
func (FakeClient) GetBlueprint ¶ added in v0.6.0
func (FakeClient) GetBlueprint(context.Context, v1beta1.CellBlueprintDoc) (GetBlueprintResult, error)
func (FakeClient) GetCell ¶
func (FakeClient) GetCell(context.Context, v1beta1.CellDoc) (GetCellResult, error)
func (FakeClient) GetCgroupDetail ¶ added in v0.10.0
func (FakeClient) GetCgroupDetail(context.Context, CgroupScope) (GetCgroupDetailResult, error)
func (FakeClient) GetConfig ¶ added in v0.6.0
func (FakeClient) GetConfig(context.Context, v1beta1.CellConfigDoc) (GetConfigResult, error)
func (FakeClient) GetContainer ¶
func (FakeClient) GetContainer(context.Context, v1beta1.ContainerDoc) (GetContainerResult, error)
func (FakeClient) GetImage ¶ added in v0.3.0
func (FakeClient) GetImage(context.Context, string, string) (GetImageResult, error)
func (FakeClient) GetNetworkDetail ¶ added in v0.10.0
func (FakeClient) GetNetworkDetail(context.Context, NetworkScope) (GetNetworkDetailResult, error)
func (FakeClient) GetRealm ¶
func (FakeClient) GetRealm(context.Context, v1beta1.RealmDoc) (GetRealmResult, error)
func (FakeClient) GetSecret ¶ added in v0.6.0
func (FakeClient) GetSecret(context.Context, v1beta1.SecretDoc) (GetSecretResult, error)
func (FakeClient) GetSpace ¶
func (FakeClient) GetSpace(context.Context, v1beta1.SpaceDoc) (GetSpaceResult, error)
func (FakeClient) GetStack ¶
func (FakeClient) GetStack(context.Context, v1beta1.StackDoc) (GetStackResult, error)
func (FakeClient) GetVolume ¶ added in v0.8.0
func (FakeClient) GetVolume(context.Context, v1beta1.VolumeDoc) (GetVolumeResult, error)
func (FakeClient) KillCell ¶
func (FakeClient) KillCell(context.Context, v1beta1.CellDoc) (KillCellResult, error)
func (FakeClient) ListBlueprints ¶ added in v0.6.0
func (FakeClient) ListBlueprints(context.Context, string, string, string) ([]v1beta1.CellBlueprintDoc, error)
func (FakeClient) ListConfigs ¶ added in v0.6.0
func (FakeClient) ListConfigs(context.Context, string, string, string) ([]v1beta1.CellConfigDoc, error)
func (FakeClient) ListContainers ¶
func (FakeClient) ListContainers(context.Context, string, string, string, string) ([]v1beta1.ContainerSpec, error)
func (FakeClient) ListImages ¶ added in v0.3.0
func (FakeClient) ListImages(context.Context, string) (ListImagesResult, error)
func (FakeClient) ListRealms ¶
func (FakeClient) ListSecrets ¶ added in v0.6.0
func (FakeClient) ListSpaces ¶
func (FakeClient) ListStacks ¶
func (FakeClient) ListVolumes ¶ added in v0.8.0
func (FakeClient) LogContainer ¶ added in v0.3.0
func (FakeClient) LogContainer(context.Context, v1beta1.ContainerDoc) (LogContainerResult, error)
func (FakeClient) MaterializeCell ¶ added in v0.6.0
func (FakeClient) MaterializeCell(context.Context, v1beta1.CellDoc) (CreateCellResult, error)
func (FakeClient) PingVersion ¶ added in v0.6.0
func (FakeClient) PingVersion(context.Context) (string, error)
func (FakeClient) PreviewCellFromConfig ¶ added in v0.10.0
func (FakeClient) PreviewCellFromConfig(context.Context, CellFromConfigRequest) (PreviewCellFromConfigResult, error)
func (FakeClient) PurgeCell ¶
func (FakeClient) PurgeCell(context.Context, v1beta1.CellDoc, bool, bool) (PurgeCellResult, error)
func (FakeClient) PurgeRealm ¶
func (FakeClient) PurgeRealm(context.Context, v1beta1.RealmDoc, bool, bool) (PurgeRealmResult, error)
func (FakeClient) PurgeSpace ¶
func (FakeClient) PurgeSpace(context.Context, v1beta1.SpaceDoc, bool, bool) (PurgeSpaceResult, error)
func (FakeClient) PurgeStack ¶
func (FakeClient) PurgeStack(context.Context, v1beta1.StackDoc, bool, bool) (PurgeStackResult, error)
func (FakeClient) RefreshAll ¶
func (FakeClient) RefreshAll(context.Context) (RefreshAllResult, error)
func (FakeClient) StartCell ¶
func (FakeClient) StartCell(context.Context, v1beta1.CellDoc) (StartCellResult, error)
func (FakeClient) StopCell ¶
func (FakeClient) StopCell(context.Context, v1beta1.CellDoc) (StopCellResult, error)
type GetBlueprintArgs ¶ added in v0.6.0
type GetBlueprintArgs struct {
Doc v1beta1.CellBlueprintDoc
}
type GetBlueprintReply ¶ added in v0.6.0
type GetBlueprintReply struct {
Result GetBlueprintResult
Err *APIError
}
type GetBlueprintResult ¶ added in v0.6.0
type GetBlueprintResult struct {
Blueprint v1beta1.CellBlueprintDoc
MetadataExists bool
}
GetBlueprintResult carries the full CellBlueprintDoc read from daemon storage (issue #620). Unlike GetSecretResult the whole document is populated — a blueprint carries only template references, no secret bytes — so `kuke run -b` can materialize it.
type GetCellArgs ¶
type GetCellReply ¶
type GetCellReply struct {
Result GetCellResult
Err *APIError
}
type GetCellResult ¶
type GetCellResult struct {
Cell v1beta1.CellDoc
MetadataExists bool
CgroupExists bool
RootContainerExists bool
// RootContainerTaskRunning reports whether the cell's root container has a
// live containerd task. Distinct from RootContainerExists, which keys on the
// containerd record that survives a host/daemon restart while the task does
// not (#654, #683). Attach gating must consult task liveness, not record
// existence, to avoid handing back a dead socket.
RootContainerTaskRunning bool
}
type GetCgroupDetailArgs ¶ added in v0.10.0
type GetCgroupDetailArgs struct {
Scope CgroupScope
}
type GetCgroupDetailReply ¶ added in v0.10.0
type GetCgroupDetailReply struct {
Result GetCgroupDetailResult
Err *APIError
}
type GetCgroupDetailResult ¶ added in v0.10.0
type GetCgroupDetailResult struct {
Scope CgroupScope `json:"scope"`
CgroupPath string `json:"cgroupPath"`
AbsolutePath string `json:"absolutePath"`
Exists bool `json:"exists"`
Ready bool `json:"ready"`
Reason string `json:"reason,omitempty"`
SubtreeControllers []string `json:"subtreeControllers,omitempty"`
NestedCgroupRuntime *bool `json:"nestedCgroupRuntime,omitempty"`
HostCgroup *bool `json:"hostCgroup,omitempty"`
Declared []CgroupDeclaredResource `json:"declared,omitempty"`
Live *CgroupLive `json:"live,omitempty"`
}
GetCgroupDetailResult combines what a resource declares about its cgroup with the live values kukeond read from the hierarchy. Live is nil when the cgroup directory does not exist.
type GetConfigArgs ¶ added in v0.6.0
type GetConfigArgs struct {
Doc v1beta1.CellConfigDoc
}
type GetConfigReply ¶ added in v0.6.0
type GetConfigReply struct {
Result GetConfigResult
Err *APIError
}
type GetConfigResult ¶ added in v0.6.0
type GetConfigResult struct {
Config v1beta1.CellConfigDoc
MetadataExists bool
}
GetConfigResult carries the full CellConfigDoc read from daemon storage (issue #644). Unlike GetSecretResult the whole document is populated — a Config carries only a blueprint ref, scalar values, and slot fills, no credential bytes — so `kuke get config` can surface the binding.
type GetContainerArgs ¶
type GetContainerArgs struct {
Doc v1beta1.ContainerDoc
}
type GetContainerReply ¶
type GetContainerReply struct {
Result GetContainerResult
Err *APIError
}
type GetContainerResult ¶
type GetContainerResult struct {
Container v1beta1.ContainerDoc
CellMetadataExists bool
ContainerExists bool
}
type GetImageArgs ¶ added in v0.3.0
GetImageArgs is the wire request for GetImage.
type GetImageReply ¶ added in v0.3.0
type GetImageReply struct {
Result GetImageResult
Err *APIError
}
GetImageReply is the wire response for GetImage.
type GetImageResult ¶ added in v0.3.0
GetImageResult carries the metadata of one named image in a realm.
type GetNetworkDetailArgs ¶ added in v0.10.0
type GetNetworkDetailArgs struct {
Scope NetworkScope
}
type GetNetworkDetailReply ¶ added in v0.10.0
type GetNetworkDetailReply struct {
Result GetNetworkDetailResult
Err *APIError
}
type GetNetworkDetailResult ¶ added in v0.10.0
type GetNetworkDetailResult struct {
Scope NetworkScope `json:"scope"`
Space SpaceNetworkDetail `json:"space"`
Cell *CellNetworkDetail `json:"cell,omitempty"`
Container *ContainerNetworkDetail `json:"container,omitempty"`
}
GetNetworkDetailResult combines what a resource declares about its networking with the runtime facts kukeond reads. Space is always the enclosing space; Cell is set for cell and container scopes; Container for container scopes.
type GetRealmArgs ¶
type GetRealmReply ¶
type GetRealmReply struct {
Result GetRealmResult
Err *APIError
}
type GetRealmResult ¶
type GetRealmResult struct {
Realm v1beta1.RealmDoc
MetadataExists bool
CgroupExists bool
ContainerdNamespaceExists bool
// Images is the daemon's resolution of Realm.Spec.Images: each entry's
// reference and its digest in the realm's containerd namespace (#1418).
Images []v1beta1.RealmImageStatus
}
type GetSecretArgs ¶ added in v0.6.0
type GetSecretReply ¶ added in v0.6.0
type GetSecretReply struct {
Result GetSecretResult
Err *APIError
}
type GetSecretResult ¶ added in v0.6.0
GetSecretResult carries the metadata-only view of a Secret. Secret.Spec.Data is never populated — the bytes do not traverse this RPC (issue #619/#622).
type GetSpaceArgs ¶
type GetSpaceReply ¶
type GetSpaceReply struct {
Result GetSpaceResult
Err *APIError
}
type GetSpaceResult ¶
type GetStackArgs ¶
type GetStackReply ¶
type GetStackReply struct {
Result GetStackResult
Err *APIError
}
type GetStackResult ¶
type GetVolumeArgs ¶ added in v0.8.0
type GetVolumeReply ¶ added in v0.8.0
type GetVolumeReply struct {
Result GetVolumeResult
Err *APIError
}
type GetVolumeResult ¶ added in v0.8.0
GetVolumeResult carries the metadata-only view of a Volume (issue #1236). A Volume has no body, so this is its scope coordinates and name only.
type ImageInfo ¶ added in v0.3.0
type ImageInfo struct {
Name string `json:"name" yaml:"name"`
Size int64 `json:"size" yaml:"size"`
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
Digest string `json:"digest" yaml:"digest"`
MediaType string `json:"mediaType" yaml:"mediaType"`
Labels map[string]string `json:"labels" yaml:"labels"`
}
ImageInfo is the rendered view of one containerd image. Size is best- effort: -1 is emitted when containerd cannot resolve the size locally so the CLI renders "-" rather than "0 B".
type KillCellArgs ¶
type KillCellReply ¶
type KillCellReply struct {
Result KillCellResult
Err *APIError
}
type KillCellResult ¶
type ListBlueprintsArgs ¶ added in v0.6.0
type ListBlueprintsReply ¶ added in v0.6.0
type ListBlueprintsReply struct {
Blueprints []v1beta1.CellBlueprintDoc
Err *APIError
}
ListBlueprintsReply carries metadata-only CellBlueprintDocs — the spec (cell template, parameters, slots) is never populated for a list (issue #643).
type ListCellsArgs ¶
type ListCellsReply ¶
type ListConfigsArgs ¶ added in v0.6.0
type ListConfigsReply ¶ added in v0.6.0
type ListConfigsReply struct {
Configs []v1beta1.CellConfigDoc
Err *APIError
}
ListConfigsReply carries metadata-only CellConfigDocs — the spec (blueprint ref, values, slot fills) is never populated for a list (issue #644).
type ListContainersArgs ¶
type ListContainersReply ¶
type ListContainersReply struct {
Containers []v1beta1.ContainerSpec
Err *APIError
}
type ListImagesArgs ¶ added in v0.3.0
type ListImagesArgs struct {
Realm string
}
ListImagesArgs is the wire request for ListImages.
type ListImagesReply ¶ added in v0.3.0
type ListImagesReply struct {
Result ListImagesResult
Err *APIError
}
ListImagesReply is the wire response for ListImages.
type ListImagesResult ¶ added in v0.3.0
ListImagesResult lists the images present in a realm's containerd namespace.
type ListRealmsArgs ¶
type ListRealmsArgs struct{}
type ListRealmsReply ¶
type ListSecretsArgs ¶ added in v0.6.0
type ListSecretsReply ¶ added in v0.6.0
ListSecretsReply carries metadata-only SecretDocs — Spec.Data is never set.
type ListSpacesArgs ¶
type ListSpacesArgs struct {
RealmName string
}
type ListSpacesReply ¶
type ListStacksArgs ¶
type ListStacksReply ¶
type ListVolumesArgs ¶ added in v0.8.0
type ListVolumesReply ¶ added in v0.8.0
ListVolumesReply carries metadata-only VolumeDocs — a Volume is never cell-scoped, so the filter bottoms out at stack (issue #1236).
type LoadImageResult ¶ added in v0.3.0
LoadImageResult reports the outcome of a `kuke image load` import: the realm/namespace it landed in and the canonical image refs containerd recorded.
type LogContainerArgs ¶ added in v0.3.0
type LogContainerArgs struct {
Doc v1beta1.ContainerDoc
}
LogContainerArgs identifies the target container for a log request.
type LogContainerReply ¶ added in v0.3.0
type LogContainerReply struct {
Result LogContainerResult
Err *APIError
}
type LogContainerResult ¶ added in v0.3.0
type LogContainerResult struct {
// HostCapturePath is the host path of the per-container sbsh capture
// file. Inside the container the same inode is reachable at
// /run/kukeon/tty/capture via the tty directory bind mount. Set only
// when the target container has Attachable=true.
HostCapturePath string
// HostLogPath is the host path of the per-container log file written
// by the containerd runtime shim (cio.LogFile mode). Set only for
// non-Attachable containers; the file is shim-owned, kuke only reads.
HostLogPath string
}
LogContainerResult carries the host-side coordinates the `kuke log` client needs to read the per-container output stream. Bytes never traverse this RPC — the client opens the returned host path directly.
Exactly one of HostCapturePath or HostLogPath is non-empty:
- Attachable containers route stdout/stderr through the sbsh terminal wrapper, which writes a tty byte stream to HostCapturePath.
- Non-Attachable containers (including kukeond) have the runtime shim append stdout/stderr to HostLogPath via cio.LogFile.
type MaterializeCellArgs ¶ added in v0.6.0
MaterializeCellArgs is the wire request for MaterializeCell. The same CellDoc shape as CreateCellArgs — the difference is purely server-side (the daemon skips the StartCell step). Kept as a distinct type so the wire-method dispatch stays unambiguous and the JSON-RPC server's reflection-based registration picks it up alongside the other methods.
type MaterializeCellReply ¶ added in v0.6.0
type MaterializeCellReply struct {
Result CreateCellResult
Err *APIError
}
MaterializeCellReply is the wire response for MaterializeCell. Mirrors CreateCellReply so the same printer renders the outcome.
type NetworkEgress ¶ added in v0.10.0
type NetworkEgress struct {
Default string `json:"default"`
DefaultSource string `json:"defaultSource"`
Allow []NetworkEgressRule `json:"allow,omitempty"`
}
NetworkEgress is the space's declared egress policy. DefaultSource is NetworkSourceDefault when spec.network.egress is absent (admit-all).
type NetworkEgressRule ¶ added in v0.10.0
type NetworkEgressRule struct {
Host string `json:"host,omitempty"`
CIDR string `json:"cidr,omitempty"`
Ports []int `json:"ports,omitempty"`
}
NetworkEgressRule is one space egress allow rule. Empty Ports means any port on the destination.
type NetworkScope ¶ added in v0.10.0
type NetworkScope struct {
Kind string `json:"kind"`
Realm string `json:"realm"`
Space string `json:"space"`
Stack string `json:"stack,omitempty"`
Cell string `json:"cell,omitempty"`
Container string `json:"container,omitempty"`
}
NetworkScope names the space, cell or container whose networking GetNetworkDetail reads. Kind selects which coordinates are required.
type PingReply ¶
PingReply carries the daemon's ack plus the daemon build version. Clients use Ping to confirm the RPC handler is serving (not just that the socket exists).
type PreviewCellFromConfigArgs ¶ added in v0.10.0
type PreviewCellFromConfigArgs struct {
Request CellFromConfigRequest
}
PreviewCellFromConfigArgs is the wire request for PreviewCellFromConfig.
type PreviewCellFromConfigReply ¶ added in v0.10.0
type PreviewCellFromConfigReply struct {
Result PreviewCellFromConfigResult
Err *APIError
}
PreviewCellFromConfigReply is the wire response for PreviewCellFromConfig.
type PreviewCellFromConfigResult ¶ added in v0.10.0
type PreviewCellFromConfigResult struct {
Cell v1beta1.CellDoc
Digest string
Values []v1beta1.RenderedValue
}
PreviewCellFromConfigResult is the rendered cell, its digest and the merge explanation.
type PruneImagesResult ¶ added in v0.6.0
type PruneImagesResult struct {
Realm string
Namespace string
LeasesDeleted int
LeasesRetained int
}
PruneImagesResult reports the outcome of a `kuke image prune`: the realm / namespace it ran against and the count of leases released vs. retained.
type PurgeCellReply ¶
type PurgeCellReply struct {
Result PurgeCellResult
Err *APIError
}
type PurgeCellResult ¶
type PurgeRealmReply ¶
type PurgeRealmReply struct {
Result PurgeRealmResult
Err *APIError
}
type PurgeRealmResult ¶
type PurgeSpaceReply ¶
type PurgeSpaceReply struct {
Result PurgeSpaceResult
Err *APIError
}
type PurgeSpaceResult ¶
type PurgeStackReply ¶
type PurgeStackReply struct {
Result PurgeStackResult
Err *APIError
}
type PurgeStackResult ¶
type RefreshAllArgs ¶
type RefreshAllArgs struct{}
type RefreshAllReply ¶
type RefreshAllReply struct {
Result RefreshAllResult
Err *APIError
}
type RefreshAllResult ¶
type SpaceNetworkDetail ¶ added in v0.10.0
type SpaceNetworkDetail struct {
NetworkName string `json:"networkName"`
BridgeName string `json:"bridgeName,omitempty"`
SubnetCIDR string `json:"subnetCIDR,omitempty"`
SubnetSource string `json:"subnetSource"`
ParentCIDR string `json:"parentCIDR,omitempty"`
ConfigPath string `json:"configPath"`
ConfigPathSource string `json:"configPathSource"`
CNINetworkExists bool `json:"cniNetworkExists"`
Egress NetworkEgress `json:"egress"`
}
SpaceNetworkDetail is what the daemon knows about a space's CNI network.
type StartCellArgs ¶
type StartCellReply ¶
type StartCellReply struct {
Result StartCellResult
Err *APIError
}
type StartCellResult ¶
type StopCellArgs ¶
type StopCellReply ¶
type StopCellReply struct {
Result StopCellResult
Err *APIError
}
type StopCellResult ¶
type UnixClient ¶
type UnixClient struct {
// contains filtered or unexported fields
}
UnixClient is a Client backed by a persistent net/rpc connection over a unix socket using the JSON-RPC codec. The connection is lazily established on first call and reused for subsequent calls on the same instance.
func NewUnixClient ¶
func NewUnixClient(sockPath string, opts ...UnixOption) *UnixClient
NewUnixClient returns a ctx-aware Client that dials the given unix socket path on first use and reuses the connection for subsequent calls.
func (*UnixClient) ApplyDocuments ¶
func (c *UnixClient) ApplyDocuments(ctx context.Context, rawYAML []byte) (ApplyDocumentsResult, error)
ApplyDocuments implements Client.
func (*UnixClient) ApplyDocumentsForTeam ¶ added in v0.6.0
func (c *UnixClient) ApplyDocumentsForTeam( ctx context.Context, rawYAML []byte, team string, ) (ApplyDocumentsResult, error)
ApplyDocumentsForTeam implements Client.
func (*UnixClient) AttachContainer ¶ added in v0.2.0
func (c *UnixClient) AttachContainer( ctx context.Context, doc v1beta1.ContainerDoc, ) (AttachContainerResult, error)
AttachContainer implements Client.
func (*UnixClient) Close ¶
func (c *UnixClient) Close() error
Close terminates the underlying rpc.Client connection if open. Safe to call multiple times.
func (*UnixClient) CreateCell ¶
func (c *UnixClient) CreateCell(ctx context.Context, doc v1beta1.CellDoc) (CreateCellResult, error)
CreateCell implements Client.
func (*UnixClient) CreateCellFromConfig ¶ added in v0.10.0
func (c *UnixClient) CreateCellFromConfig( ctx context.Context, req CellFromConfigRequest, ) (CreateCellFromConfigResult, error)
CreateCellFromConfig implements Client.
func (*UnixClient) CreateConfig ¶ added in v0.6.0
func (c *UnixClient) CreateConfig( ctx context.Context, doc v1beta1.CellConfigDoc, ) (CreateConfigResult, error)
CreateConfig implements Client (#839).
func (*UnixClient) CreateRealm ¶
func (c *UnixClient) CreateRealm(ctx context.Context, doc v1beta1.RealmDoc) (CreateRealmResult, error)
CreateRealm implements Client.
func (*UnixClient) CreateSecret ¶ added in v0.6.0
func (c *UnixClient) CreateSecret( ctx context.Context, doc v1beta1.SecretDoc, ) (CreateSecretResult, error)
CreateSecret implements Client (#815).
func (*UnixClient) CreateSpace ¶
func (c *UnixClient) CreateSpace(ctx context.Context, doc v1beta1.SpaceDoc) (CreateSpaceResult, error)
CreateSpace implements Client.
func (*UnixClient) CreateStack ¶
func (c *UnixClient) CreateStack(ctx context.Context, doc v1beta1.StackDoc) (CreateStackResult, error)
CreateStack implements Client.
func (*UnixClient) CreateVolume ¶ added in v0.8.0
func (c *UnixClient) CreateVolume( ctx context.Context, doc v1beta1.VolumeDoc, ) (CreateVolumeResult, error)
CreateVolume implements Client (#1236).
func (*UnixClient) DeleteBlueprint ¶ added in v0.6.0
func (c *UnixClient) DeleteBlueprint( ctx context.Context, doc v1beta1.CellBlueprintDoc, ) (DeleteBlueprintResult, error)
DeleteBlueprint implements Client.
func (*UnixClient) DeleteCell ¶
func (c *UnixClient) DeleteCell(ctx context.Context, doc v1beta1.CellDoc) (DeleteCellResult, error)
DeleteCell implements Client.
func (*UnixClient) DeleteConfig ¶ added in v0.6.0
func (c *UnixClient) DeleteConfig( ctx context.Context, doc v1beta1.CellConfigDoc, ) (DeleteConfigResult, error)
DeleteConfig implements Client.
func (*UnixClient) DeleteDocuments ¶ added in v0.6.0
func (c *UnixClient) DeleteDocuments( ctx context.Context, rawYAML []byte, cascade, force bool, ) (DeleteDocumentsResult, error)
DeleteDocuments implements Client.
func (*UnixClient) DeleteRealm ¶
func (c *UnixClient) DeleteRealm( ctx context.Context, doc v1beta1.RealmDoc, force, cascade bool, ) (DeleteRealmResult, error)
DeleteRealm implements Client.
func (*UnixClient) DeleteSecret ¶ added in v0.6.0
func (c *UnixClient) DeleteSecret(ctx context.Context, doc v1beta1.SecretDoc) (DeleteSecretResult, error)
DeleteSecret implements Client.
func (*UnixClient) DeleteSpace ¶
func (c *UnixClient) DeleteSpace( ctx context.Context, doc v1beta1.SpaceDoc, force, cascade bool, ) (DeleteSpaceResult, error)
DeleteSpace implements Client.
func (*UnixClient) DeleteStack ¶
func (c *UnixClient) DeleteStack( ctx context.Context, doc v1beta1.StackDoc, force, cascade bool, ) (DeleteStackResult, error)
DeleteStack implements Client.
func (*UnixClient) DeleteVolume ¶ added in v0.8.0
func (c *UnixClient) DeleteVolume(ctx context.Context, doc v1beta1.VolumeDoc) (DeleteVolumeResult, error)
DeleteVolume implements Client (#1236).
func (*UnixClient) GetBlueprint ¶ added in v0.6.0
func (c *UnixClient) GetBlueprint( ctx context.Context, doc v1beta1.CellBlueprintDoc, ) (GetBlueprintResult, error)
GetBlueprint implements Client.
func (*UnixClient) GetCell ¶
func (c *UnixClient) GetCell(ctx context.Context, doc v1beta1.CellDoc) (GetCellResult, error)
GetCell implements Client.
func (*UnixClient) GetCgroupDetail ¶ added in v0.10.0
func (c *UnixClient) GetCgroupDetail(ctx context.Context, scope CgroupScope) (GetCgroupDetailResult, error)
GetCgroupDetail implements Client (#1410).
func (*UnixClient) GetConfig ¶ added in v0.6.0
func (c *UnixClient) GetConfig( ctx context.Context, doc v1beta1.CellConfigDoc, ) (GetConfigResult, error)
GetConfig implements Client.
func (*UnixClient) GetContainer ¶
func (c *UnixClient) GetContainer(ctx context.Context, doc v1beta1.ContainerDoc) (GetContainerResult, error)
GetContainer implements Client.
func (*UnixClient) GetImage ¶ added in v0.3.0
func (c *UnixClient) GetImage(ctx context.Context, realm, ref string) (GetImageResult, error)
GetImage implements Client (#1406).
func (*UnixClient) GetNetworkDetail ¶ added in v0.10.0
func (c *UnixClient) GetNetworkDetail(ctx context.Context, scope NetworkScope) (GetNetworkDetailResult, error)
GetNetworkDetail implements Client (#1411).
func (*UnixClient) GetRealm ¶
func (c *UnixClient) GetRealm(ctx context.Context, doc v1beta1.RealmDoc) (GetRealmResult, error)
GetRealm implements Client.
func (*UnixClient) GetSecret ¶ added in v0.6.0
func (c *UnixClient) GetSecret(ctx context.Context, doc v1beta1.SecretDoc) (GetSecretResult, error)
GetSecret implements Client.
func (*UnixClient) GetSpace ¶
func (c *UnixClient) GetSpace(ctx context.Context, doc v1beta1.SpaceDoc) (GetSpaceResult, error)
GetSpace implements Client.
func (*UnixClient) GetStack ¶
func (c *UnixClient) GetStack(ctx context.Context, doc v1beta1.StackDoc) (GetStackResult, error)
GetStack implements Client.
func (*UnixClient) GetVolume ¶ added in v0.8.0
func (c *UnixClient) GetVolume(ctx context.Context, doc v1beta1.VolumeDoc) (GetVolumeResult, error)
GetVolume implements Client (#1236).
func (*UnixClient) KillCell ¶
func (c *UnixClient) KillCell(ctx context.Context, doc v1beta1.CellDoc) (KillCellResult, error)
KillCell implements Client.
func (*UnixClient) ListBlueprints ¶ added in v0.6.0
func (c *UnixClient) ListBlueprints( ctx context.Context, realmName, spaceName, stackName string, ) ([]v1beta1.CellBlueprintDoc, error)
ListBlueprints implements Client.
func (*UnixClient) ListCells ¶
func (c *UnixClient) ListCells(ctx context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellDoc, error)
ListCells implements Client.
func (*UnixClient) ListConfigs ¶ added in v0.6.0
func (c *UnixClient) ListConfigs( ctx context.Context, realmName, spaceName, stackName string, ) ([]v1beta1.CellConfigDoc, error)
ListConfigs implements Client.
func (*UnixClient) ListContainers ¶
func (c *UnixClient) ListContainers( ctx context.Context, realmName, spaceName, stackName, cellName string, ) ([]v1beta1.ContainerSpec, error)
ListContainers implements Client.
func (*UnixClient) ListImages ¶ added in v0.3.0
func (c *UnixClient) ListImages(ctx context.Context, realm string) (ListImagesResult, error)
ListImages implements Client (#1406). Read-only; see the Client note on why the mutating image methods stay in-process.
func (*UnixClient) ListRealms ¶
ListRealms implements Client.
func (*UnixClient) ListSecrets ¶ added in v0.6.0
func (c *UnixClient) ListSecrets( ctx context.Context, realmName, spaceName, stackName, cellName string, ) ([]v1beta1.SecretDoc, error)
ListSecrets implements Client.
func (*UnixClient) ListSpaces ¶
ListSpaces implements Client.
func (*UnixClient) ListStacks ¶
func (c *UnixClient) ListStacks(ctx context.Context, realmName, spaceName string) ([]v1beta1.StackDoc, error)
ListStacks implements Client.
func (*UnixClient) ListVolumes ¶ added in v0.8.0
func (c *UnixClient) ListVolumes( ctx context.Context, realmName, spaceName, stackName string, ) ([]v1beta1.VolumeDoc, error)
ListVolumes implements Client (#1236).
func (*UnixClient) LogContainer ¶ added in v0.3.0
func (c *UnixClient) LogContainer( ctx context.Context, doc v1beta1.ContainerDoc, ) (LogContainerResult, error)
LogContainer implements Client.
func (*UnixClient) MaterializeCell ¶ added in v0.6.0
func (c *UnixClient) MaterializeCell(ctx context.Context, doc v1beta1.CellDoc) (CreateCellResult, error)
MaterializeCell implements Client.
func (*UnixClient) Ping ¶
func (c *UnixClient) Ping(ctx context.Context) error
Ping implements Client.
func (*UnixClient) PingVersion ¶ added in v0.6.0
func (c *UnixClient) PingVersion(ctx context.Context) (string, error)
PingVersion returns the daemon's reported build version. The wire reply has carried Version since the RPC's introduction; the helper exposes it to callers (notably `kuke status`) without forcing them to hand-roll the Ping wire.
func (*UnixClient) PreviewCellFromConfig ¶ added in v0.10.0
func (c *UnixClient) PreviewCellFromConfig( ctx context.Context, req CellFromConfigRequest, ) (PreviewCellFromConfigResult, error)
PreviewCellFromConfig implements Client.
func (*UnixClient) PurgeCell ¶
func (c *UnixClient) PurgeCell(ctx context.Context, doc v1beta1.CellDoc, force, cascade bool) (PurgeCellResult, error)
PurgeCell implements Client.
func (*UnixClient) PurgeRealm ¶
func (c *UnixClient) PurgeRealm( ctx context.Context, doc v1beta1.RealmDoc, force, cascade bool, ) (PurgeRealmResult, error)
PurgeRealm implements Client.
func (*UnixClient) PurgeSpace ¶
func (c *UnixClient) PurgeSpace( ctx context.Context, doc v1beta1.SpaceDoc, force, cascade bool, ) (PurgeSpaceResult, error)
PurgeSpace implements Client.
func (*UnixClient) PurgeStack ¶
func (c *UnixClient) PurgeStack( ctx context.Context, doc v1beta1.StackDoc, force, cascade bool, ) (PurgeStackResult, error)
PurgeStack implements Client.
func (*UnixClient) RefreshAll ¶
func (c *UnixClient) RefreshAll(ctx context.Context) (RefreshAllResult, error)
RefreshAll implements Client.
func (*UnixClient) StartCell ¶
func (c *UnixClient) StartCell(ctx context.Context, doc v1beta1.CellDoc) (StartCellResult, error)
StartCell implements Client.
func (*UnixClient) StopCell ¶
func (c *UnixClient) StopCell(ctx context.Context, doc v1beta1.CellDoc) (StopCellResult, error)
StopCell implements Client.
type UnixOption ¶
type UnixOption func(*UnixClient)
UnixOption configures a UnixClient.
func WithDialTimeout ¶
func WithDialTimeout(d time.Duration) UnixOption
WithDialTimeout overrides the dial timeout for NewUnixClient.