kukeonv1

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

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

View Source
const (
	MethodCreateRealm     = ServiceName + ".CreateRealm"
	MethodCreateSpace     = ServiceName + ".CreateSpace"
	MethodCreateStack     = ServiceName + ".CreateStack"
	MethodCreateCell      = ServiceName + ".CreateCell"
	MethodMaterializeCell = ServiceName + ".MaterializeCell"
	MethodCreateConfig    = ServiceName + ".CreateConfig"
	MethodCreateSecret    = ServiceName + ".CreateSecret"

	MethodGetRealm     = ServiceName + ".GetRealm"
	MethodGetSpace     = ServiceName + ".GetSpace"
	MethodGetStack     = ServiceName + ".GetStack"
	MethodGetCell      = ServiceName + ".GetCell"
	MethodGetContainer = ServiceName + ".GetContainer"
	MethodGetSecret    = ServiceName + ".GetSecret"
	MethodGetBlueprint = ServiceName + ".GetBlueprint"
	MethodGetConfig    = ServiceName + ".GetConfig"

	MethodListRealms     = ServiceName + ".ListRealms"
	MethodListSpaces     = ServiceName + ".ListSpaces"
	MethodListStacks     = ServiceName + ".ListStacks"
	MethodListCells      = ServiceName + ".ListCells"
	MethodListContainers = ServiceName + ".ListContainers"
	MethodListSecrets    = ServiceName + ".ListSecrets"
	MethodListBlueprints = ServiceName + ".ListBlueprints"
	MethodListConfigs    = ServiceName + ".ListConfigs"

	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"

	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.

View Source
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

View Source
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).

View Source
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

func FromAPIError(e *APIError) error

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

func KindFromError(err error) string

KindFromError inspects err and returns the best-matching wire Kind, falling back to "Unknown" when nothing registered matches.

Types

type APIError

type APIError struct {
	Kind    string
	Message string
}

APIError is a serializable error. Kind identifies the error class; client code maps it back to an errdefs.* sentinel so that errors.Is(err, errdefs.X) keeps working across the wire.

func ToAPIError

func ToAPIError(err error) *APIError

ToAPIError converts a Go error into a wire APIError. Returns nil for nil.

func (*APIError) Error

func (e *APIError) Error() string

type ApplyDocumentsArgs

type ApplyDocumentsArgs struct {
	RawYAML []byte
	Team    string
}

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 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)
	// 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)

	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)
	// 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)
	// 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)
	// 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)
	// 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.

func Dial

func Dial(_ context.Context, addr string) (Client, error)

Dial parses addr and returns a connected Client.

Supported schemes:

  • unix:///absolute/path/to/socket

Planned schemes:

  • ssh://user@host[:port] (tunnels to the remote unix socket)

type ContainerCreationOutcome

type ContainerCreationOutcome struct {
	Name       string
	ExistsPre  bool
	ExistsPost bool
	Created    bool
}

type CreateCellArgs

type CreateCellArgs struct {
	Doc v1beta1.CellDoc
}

CreateCellArgs is the wire request for CreateCell.

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 CreateRealmArgs struct {
	Doc v1beta1.RealmDoc
}

type CreateRealmReply

type CreateRealmReply struct {
	Result CreateRealmResult
	Err    *APIError
}

type CreateRealmResult

type CreateRealmResult struct {
	Realm v1beta1.RealmDoc

	MetadataExistsPre             bool
	MetadataExistsPost            bool
	CgroupExistsPre               bool
	CgroupExistsPost              bool
	CgroupCreated                 bool
	ContainerdNamespaceExistsPre  bool
	ContainerdNamespaceExistsPost bool
	ContainerdNamespaceCreated    bool
	Created                       bool
}

type CreateSecretArgs added in v0.6.0

type CreateSecretArgs struct {
	Doc v1beta1.SecretDoc
}

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

type CreateSecretResult struct {
	Secret  v1beta1.SecretDoc
	Created bool
}

CreateSecretResult reports the outcome of a Secret write.

type CreateSpaceArgs

type CreateSpaceArgs struct {
	Doc v1beta1.SpaceDoc
}

type CreateSpaceReply

type CreateSpaceReply struct {
	Result CreateSpaceResult
	Err    *APIError
}

type CreateSpaceResult

type CreateSpaceResult struct {
	Space v1beta1.SpaceDoc

	MetadataExistsPre    bool
	MetadataExistsPost   bool
	CgroupExistsPre      bool
	CgroupExistsPost     bool
	CgroupCreated        bool
	CNINetworkExistsPre  bool
	CNINetworkExistsPost bool
	CNINetworkCreated    bool
	Created              bool
}

type CreateStackArgs

type CreateStackArgs struct {
	Doc v1beta1.StackDoc
}

type CreateStackReply

type CreateStackReply struct {
	Result CreateStackResult
	Err    *APIError
}

type CreateStackResult

type CreateStackResult struct {
	Stack v1beta1.StackDoc

	MetadataExistsPre  bool
	MetadataExistsPost bool
	CgroupExistsPre    bool
	CgroupExistsPost   bool
	CgroupCreated      bool
	Created            bool
}

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 DeleteCellArgs struct {
	Doc v1beta1.CellDoc
}

type DeleteCellReply

type DeleteCellReply struct {
	Result DeleteCellResult
	Err    *APIError
}

type DeleteCellResult

type DeleteCellResult struct {
	Cell              v1beta1.CellDoc
	ContainersDeleted bool
	CgroupDeleted     bool
	MetadataDeleted   bool
}

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

type DeleteDocumentsArgs struct {
	RawYAML []byte
	Cascade bool
	Force   bool
}

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

type DeleteImageResult struct {
	Realm     string
	Namespace string
	Ref       string
}

DeleteImageResult reports the outcome of a `kuke image delete` removal.

type DeleteRealmArgs

type DeleteRealmArgs struct {
	Doc     v1beta1.RealmDoc
	Force   bool
	Cascade bool
}

type DeleteRealmReply

type DeleteRealmReply struct {
	Result DeleteRealmResult
	Err    *APIError
}

type DeleteRealmResult

type DeleteRealmResult struct {
	Realm                      v1beta1.RealmDoc
	Deleted                    []string
	MetadataDeleted            bool
	CgroupDeleted              bool
	ContainerdNamespaceDeleted bool
}

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 DeleteSecretArgs struct {
	Doc v1beta1.SecretDoc
}

type DeleteSecretReply added in v0.6.0

type DeleteSecretReply struct {
	Result DeleteSecretResult
	Err    *APIError
}

type DeleteSecretResult added in v0.6.0

type DeleteSecretResult struct {
	Secret  v1beta1.SecretDoc
	Deleted bool
}

DeleteSecretResult reports the removed Secret (metadata only) and whether the file existed to delete.

type DeleteSpaceArgs

type DeleteSpaceArgs struct {
	Doc     v1beta1.SpaceDoc
	Force   bool
	Cascade bool
}

type DeleteSpaceReply

type DeleteSpaceReply struct {
	Result DeleteSpaceResult
	Err    *APIError
}

type DeleteSpaceResult

type DeleteSpaceResult struct {
	Space             v1beta1.SpaceDoc
	SpaceName         string
	RealmName         string
	MetadataDeleted   bool
	CgroupDeleted     bool
	CNINetworkDeleted bool
	Deleted           []string
}

type DeleteStackArgs

type DeleteStackArgs struct {
	Doc     v1beta1.StackDoc
	Force   bool
	Cascade bool
}

type DeleteStackReply

type DeleteStackReply struct {
	Result DeleteStackResult
	Err    *APIError
}

type DeleteStackResult

type DeleteStackResult struct {
	Stack           v1beta1.StackDoc
	StackName       string
	RealmName       string
	SpaceName       string
	MetadataDeleted bool
	CgroupDeleted   bool
	Deleted         []string
}

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) Close

func (FakeClient) Close() error

func (FakeClient) CreateCell

func (FakeClient) CreateConfig added in v0.6.0

func (FakeClient) CreateRealm

func (FakeClient) CreateSecret added in v0.6.0

func (FakeClient) CreateSpace

func (FakeClient) CreateStack

func (FakeClient) DeleteBlueprint added in v0.6.0

func (FakeClient) DeleteCell

func (FakeClient) DeleteConfig added in v0.6.0

func (FakeClient) DeleteDocuments added in v0.6.0

func (FakeClient) DeleteRealm

func (FakeClient) DeleteSecret added in v0.6.0

func (FakeClient) DeleteSpace

func (FakeClient) DeleteStack

func (FakeClient) GetBlueprint added in v0.6.0

func (FakeClient) GetCell

func (FakeClient) GetConfig added in v0.6.0

func (FakeClient) GetRealm

func (FakeClient) GetSecret added in v0.6.0

func (FakeClient) GetSpace

func (FakeClient) GetStack

func (FakeClient) KillCell

func (FakeClient) ListBlueprints added in v0.6.0

func (FakeClient) ListCells

func (FakeClient) ListConfigs added in v0.6.0

func (FakeClient) ListContainers

func (FakeClient) ListRealms

func (FakeClient) ListRealms(context.Context) ([]v1beta1.RealmDoc, error)

func (FakeClient) ListSecrets added in v0.6.0

func (FakeClient) ListSpaces

func (FakeClient) ListStacks

func (FakeClient) LogContainer added in v0.3.0

func (FakeClient) MaterializeCell added in v0.6.0

func (FakeClient) Ping

func (FakeClient) PingVersion added in v0.6.0

func (FakeClient) PingVersion(context.Context) (string, error)

func (FakeClient) PurgeCell

func (FakeClient) PurgeRealm

func (FakeClient) PurgeSpace

func (FakeClient) PurgeStack

func (FakeClient) RefreshAll

func (FakeClient) StartCell

func (FakeClient) StopCell

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 GetCellArgs struct {
	Doc v1beta1.CellDoc
}

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 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 GetImageResult added in v0.3.0

type GetImageResult struct {
	Realm     string
	Namespace string
	Image     ImageInfo
}

GetImageResult carries the metadata of one named image in a realm.

type GetRealmArgs

type GetRealmArgs struct {
	Doc v1beta1.RealmDoc
}

type GetRealmReply

type GetRealmReply struct {
	Result GetRealmResult
	Err    *APIError
}

type GetRealmResult

type GetRealmResult struct {
	Realm                     v1beta1.RealmDoc
	MetadataExists            bool
	CgroupExists              bool
	ContainerdNamespaceExists bool
}

type GetSecretArgs added in v0.6.0

type GetSecretArgs struct {
	Doc v1beta1.SecretDoc
}

type GetSecretReply added in v0.6.0

type GetSecretReply struct {
	Result GetSecretResult
	Err    *APIError
}

type GetSecretResult added in v0.6.0

type GetSecretResult struct {
	Secret         v1beta1.SecretDoc
	MetadataExists bool
}

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 GetSpaceArgs struct {
	Doc v1beta1.SpaceDoc
}

type GetSpaceReply

type GetSpaceReply struct {
	Result GetSpaceResult
	Err    *APIError
}

type GetSpaceResult

type GetSpaceResult struct {
	Space            v1beta1.SpaceDoc
	MetadataExists   bool
	CgroupExists     bool
	CNINetworkExists bool
}

type GetStackArgs

type GetStackArgs struct {
	Doc v1beta1.StackDoc
}

type GetStackReply

type GetStackReply struct {
	Result GetStackResult
	Err    *APIError
}

type GetStackResult

type GetStackResult struct {
	Stack          v1beta1.StackDoc
	MetadataExists bool
	CgroupExists   bool
}

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 KillCellArgs struct {
	Doc v1beta1.CellDoc
}

type KillCellReply

type KillCellReply struct {
	Result KillCellResult
	Err    *APIError
}

type KillCellResult

type KillCellResult struct {
	Cell   v1beta1.CellDoc
	Killed bool
}

type ListBlueprintsArgs added in v0.6.0

type ListBlueprintsArgs struct {
	RealmName string
	SpaceName string
	StackName string
}

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 ListCellsArgs struct {
	RealmName string
	SpaceName string
	StackName string
}

type ListCellsReply

type ListCellsReply struct {
	Cells []v1beta1.CellDoc
	Err   *APIError
}

type ListConfigsArgs added in v0.6.0

type ListConfigsArgs struct {
	RealmName string
	SpaceName string
	StackName string
}

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 ListContainersArgs struct {
	RealmName string
	SpaceName string
	StackName string
	CellName  string
}

type ListContainersReply

type ListContainersReply struct {
	Containers []v1beta1.ContainerSpec
	Err        *APIError
}

type ListImagesResult added in v0.3.0

type ListImagesResult struct {
	Realm     string
	Namespace string
	Images    []ImageInfo
}

ListImagesResult lists the images present in a realm's containerd namespace.

type ListRealmsArgs

type ListRealmsArgs struct{}

type ListRealmsReply

type ListRealmsReply struct {
	Realms []v1beta1.RealmDoc
	Err    *APIError
}

type ListSecretsArgs added in v0.6.0

type ListSecretsArgs struct {
	RealmName string
	SpaceName string
	StackName string
	CellName  string
}

type ListSecretsReply added in v0.6.0

type ListSecretsReply struct {
	Secrets []v1beta1.SecretDoc
	Err     *APIError
}

ListSecretsReply carries metadata-only SecretDocs — Spec.Data is never set.

type ListSpacesArgs

type ListSpacesArgs struct {
	RealmName string
}

type ListSpacesReply

type ListSpacesReply struct {
	Spaces []v1beta1.SpaceDoc
	Err    *APIError
}

type ListStacksArgs

type ListStacksArgs struct {
	RealmName string
	SpaceName string
}

type ListStacksReply

type ListStacksReply struct {
	Stacks []v1beta1.StackDoc
	Err    *APIError
}

type LoadImageResult added in v0.3.0

type LoadImageResult struct {
	Realm     string
	Namespace string
	Images    []string
}

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

type MaterializeCellArgs struct {
	Doc v1beta1.CellDoc
}

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 PingArgs

type PingArgs struct{}

PingArgs is the empty request payload for the Ping RPC.

type PingReply

type PingReply struct {
	OK      bool
	Version string
	Err     *APIError
}

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 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 PurgeCellArgs

type PurgeCellArgs struct {
	Doc     v1beta1.CellDoc
	Force   bool
	Cascade bool
}

type PurgeCellReply

type PurgeCellReply struct {
	Result PurgeCellResult
	Err    *APIError
}

type PurgeCellResult

type PurgeCellResult struct {
	Cell              v1beta1.CellDoc
	ContainersDeleted bool
	CgroupDeleted     bool
	MetadataDeleted   bool
	PurgeSucceeded    bool
	Force             bool
	Cascade           bool
	Deleted           []string
	Purged            []string
}

type PurgeRealmArgs

type PurgeRealmArgs struct {
	Doc     v1beta1.RealmDoc
	Force   bool
	Cascade bool
}

type PurgeRealmReply

type PurgeRealmReply struct {
	Result PurgeRealmResult
	Err    *APIError
}

type PurgeRealmResult

type PurgeRealmResult struct {
	Realm          v1beta1.RealmDoc
	RealmDeleted   bool
	PurgeSucceeded bool
	Force          bool
	Cascade        bool
	Deleted        []string
	Purged         []string
}

type PurgeSpaceArgs

type PurgeSpaceArgs struct {
	Doc     v1beta1.SpaceDoc
	Force   bool
	Cascade bool
}

type PurgeSpaceReply

type PurgeSpaceReply struct {
	Result PurgeSpaceResult
	Err    *APIError
}

type PurgeSpaceResult

type PurgeSpaceResult struct {
	Space             v1beta1.SpaceDoc
	MetadataDeleted   bool
	CgroupDeleted     bool
	CNINetworkDeleted bool
	PurgeSucceeded    bool
	Force             bool
	Cascade           bool
	Deleted           []string
	Purged            []string
}

type PurgeStackArgs

type PurgeStackArgs struct {
	Doc     v1beta1.StackDoc
	Force   bool
	Cascade bool
}

type PurgeStackReply

type PurgeStackReply struct {
	Result PurgeStackResult
	Err    *APIError
}

type PurgeStackResult

type PurgeStackResult struct {
	Stack   v1beta1.StackDoc
	Deleted []string
	Purged  []string
}

type RefreshAllArgs

type RefreshAllArgs struct{}

type RefreshAllReply

type RefreshAllReply struct {
	Result RefreshAllResult
	Err    *APIError
}

type RefreshAllResult

type RefreshAllResult struct {
	RealmsFound       []string
	SpacesFound       []string
	StacksFound       []string
	CellsFound        []string
	ContainersFound   []string
	RealmsUpdated     []string
	SpacesUpdated     []string
	StacksUpdated     []string
	CellsUpdated      []string
	ContainersUpdated []string
	Errors            []string
}

type StartCellArgs

type StartCellArgs struct {
	Doc v1beta1.CellDoc
}

type StartCellReply

type StartCellReply struct {
	Result StartCellResult
	Err    *APIError
}

type StartCellResult

type StartCellResult struct {
	Cell    v1beta1.CellDoc
	Started bool
}

type StopCellArgs

type StopCellArgs struct {
	Doc v1beta1.CellDoc
}

type StopCellReply

type StopCellReply struct {
	Result StopCellResult
	Err    *APIError
}

type StopCellResult

type StopCellResult struct {
	Cell    v1beta1.CellDoc
	Stopped bool
}

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) 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) 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) 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) 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) 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) 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) ListRealms

func (c *UnixClient) ListRealms(ctx context.Context) ([]v1beta1.RealmDoc, error)

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

func (c *UnixClient) ListSpaces(ctx context.Context, realmName string) ([]v1beta1.SpaceDoc, error)

ListSpaces implements Client.

func (*UnixClient) ListStacks

func (c *UnixClient) ListStacks(ctx context.Context, realmName, spaceName string) ([]v1beta1.StackDoc, error)

ListStacks implements Client.

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) 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.

Jump to

Keyboard shortcuts

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