local

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package local provides an in-process kukeonv1.Client backed by a controller.Exec. Used by the CLI in --no-daemon mode and by the daemon itself when servicing RPC calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an in-process kukeonv1.Client.

func New

func New(ctx context.Context, logger *slog.Logger, opts controller.Options) *Client

New returns a Client that owns its controller.Exec. Close releases it.

func NewFromExec

func NewFromExec(ctrl *controller.Exec) *Client

NewFromExec wraps an already-constructed controller.Exec. The caller retains ownership of ctrl; Close is a no-op in this mode.

func (*Client) ApplyDocuments

func (c *Client) ApplyDocuments(_ context.Context, rawYAML []byte) (kukeonv1.ApplyDocumentsResult, error)

func (*Client) AttachContainer added in v0.2.0

AttachContainer enforces the Attachable gate and resolves the host-side sbsh control-socket path. Bytes never traverse this RPC — the caller (`kuke attach`) opens HostSocketPath directly and runs the sbsh client loop against it.

func (*Client) Close

func (c *Client) Close() error

Close releases the underlying controller if this Client owns it.

func (*Client) CreateCell

CreateCell normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.

func (*Client) CreateContainer

CreateContainer normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.

func (*Client) CreateRealm

CreateRealm normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.

func (*Client) CreateSpace

CreateSpace normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.

func (*Client) CreateStack

CreateStack normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.

func (*Client) DeleteCell

func (*Client) DeleteContainer

func (*Client) DeleteRealm

func (c *Client) DeleteRealm(
	_ context.Context,
	doc v1beta1.RealmDoc,
	force, cascade bool,
) (kukeonv1.DeleteRealmResult, error)

func (*Client) DeleteSpace

func (c *Client) DeleteSpace(
	_ context.Context,
	doc v1beta1.SpaceDoc,
	force, cascade bool,
) (kukeonv1.DeleteSpaceResult, error)

func (*Client) DeleteStack

func (c *Client) DeleteStack(
	_ context.Context,
	doc v1beta1.StackDoc,
	force, cascade bool,
) (kukeonv1.DeleteStackResult, error)

func (*Client) GetCell

func (*Client) GetContainer

func (*Client) GetRealm

func (*Client) GetSpace

func (*Client) GetStack

func (*Client) KillCell

func (*Client) KillContainer

func (*Client) ListCells

func (c *Client) ListCells(_ context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellDoc, error)

func (*Client) ListContainers

func (c *Client) ListContainers(
	_ context.Context,
	realmName, spaceName, stackName, cellName string,
) ([]v1beta1.ContainerSpec, error)

func (*Client) ListRealms

func (c *Client) ListRealms(_ context.Context) ([]v1beta1.RealmDoc, error)

func (*Client) ListSpaces

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

func (*Client) ListStacks

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

func (*Client) Ping

func (c *Client) Ping(_ context.Context) error

Ping is a no-op in the in-process client: the controller is alive if this method can run. Implemented so *local.Client satisfies kukeonv1.Client.

func (*Client) PurgeCell

func (c *Client) PurgeCell(
	_ context.Context,
	doc v1beta1.CellDoc,
	force, cascade bool,
) (kukeonv1.PurgeCellResult, error)

func (*Client) PurgeContainer

func (*Client) PurgeRealm

func (c *Client) PurgeRealm(
	_ context.Context,
	doc v1beta1.RealmDoc,
	force, cascade bool,
) (kukeonv1.PurgeRealmResult, error)

func (*Client) PurgeSpace

func (c *Client) PurgeSpace(
	_ context.Context,
	doc v1beta1.SpaceDoc,
	force, cascade bool,
) (kukeonv1.PurgeSpaceResult, error)

func (*Client) PurgeStack

func (c *Client) PurgeStack(
	_ context.Context,
	doc v1beta1.StackDoc,
	force, cascade bool,
) (kukeonv1.PurgeStackResult, error)

func (*Client) RefreshAll

func (c *Client) RefreshAll(_ context.Context) (kukeonv1.RefreshAllResult, error)

func (*Client) StartCell

func (*Client) StartContainer

func (*Client) StopCell

func (*Client) StopContainer

Jump to

Keyboard shortcuts

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