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 ¶
- type Client
- func (c *Client) ApplyDocuments(_ context.Context, rawYAML []byte) (kukeonv1.ApplyDocumentsResult, error)
- func (c *Client) AttachContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.AttachContainerResult, error)
- func (c *Client) Close() error
- func (c *Client) CreateCell(_ context.Context, doc v1beta1.CellDoc) (kukeonv1.CreateCellResult, error)
- func (c *Client) CreateContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.CreateContainerResult, error)
- func (c *Client) CreateRealm(_ context.Context, doc v1beta1.RealmDoc) (kukeonv1.CreateRealmResult, error)
- func (c *Client) CreateSpace(_ context.Context, doc v1beta1.SpaceDoc) (kukeonv1.CreateSpaceResult, error)
- func (c *Client) CreateStack(_ context.Context, doc v1beta1.StackDoc) (kukeonv1.CreateStackResult, error)
- func (c *Client) DeleteCell(_ context.Context, doc v1beta1.CellDoc) (kukeonv1.DeleteCellResult, error)
- func (c *Client) DeleteContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.DeleteContainerResult, error)
- func (c *Client) DeleteRealm(_ context.Context, doc v1beta1.RealmDoc, force, cascade bool) (kukeonv1.DeleteRealmResult, error)
- func (c *Client) DeleteSpace(_ context.Context, doc v1beta1.SpaceDoc, force, cascade bool) (kukeonv1.DeleteSpaceResult, error)
- func (c *Client) DeleteStack(_ context.Context, doc v1beta1.StackDoc, force, cascade bool) (kukeonv1.DeleteStackResult, error)
- func (c *Client) GetCell(_ context.Context, doc v1beta1.CellDoc) (kukeonv1.GetCellResult, error)
- func (c *Client) GetContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.GetContainerResult, error)
- func (c *Client) GetRealm(_ context.Context, doc v1beta1.RealmDoc) (kukeonv1.GetRealmResult, error)
- func (c *Client) GetSpace(_ context.Context, doc v1beta1.SpaceDoc) (kukeonv1.GetSpaceResult, error)
- func (c *Client) GetStack(_ context.Context, doc v1beta1.StackDoc) (kukeonv1.GetStackResult, error)
- func (c *Client) KillCell(_ context.Context, doc v1beta1.CellDoc) (kukeonv1.KillCellResult, error)
- func (c *Client) KillContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.KillContainerResult, error)
- func (c *Client) ListCells(_ context.Context, realmName, spaceName, stackName string) ([]v1beta1.CellDoc, error)
- func (c *Client) ListContainers(_ context.Context, realmName, spaceName, stackName, cellName string) ([]v1beta1.ContainerSpec, error)
- func (c *Client) ListRealms(_ context.Context) ([]v1beta1.RealmDoc, error)
- func (c *Client) ListSpaces(_ context.Context, realmName string) ([]v1beta1.SpaceDoc, error)
- func (c *Client) ListStacks(_ context.Context, realmName, spaceName string) ([]v1beta1.StackDoc, error)
- func (c *Client) Ping(_ context.Context) error
- func (c *Client) PurgeCell(_ context.Context, doc v1beta1.CellDoc, force, cascade bool) (kukeonv1.PurgeCellResult, error)
- func (c *Client) PurgeContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.PurgeContainerResult, error)
- func (c *Client) PurgeRealm(_ context.Context, doc v1beta1.RealmDoc, force, cascade bool) (kukeonv1.PurgeRealmResult, error)
- func (c *Client) PurgeSpace(_ context.Context, doc v1beta1.SpaceDoc, force, cascade bool) (kukeonv1.PurgeSpaceResult, error)
- func (c *Client) PurgeStack(_ context.Context, doc v1beta1.StackDoc, force, cascade bool) (kukeonv1.PurgeStackResult, error)
- func (c *Client) RefreshAll(_ context.Context) (kukeonv1.RefreshAllResult, error)
- func (c *Client) StartCell(_ context.Context, doc v1beta1.CellDoc) (kukeonv1.StartCellResult, error)
- func (c *Client) StartContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.StartContainerResult, error)
- func (c *Client) StopCell(_ context.Context, doc v1beta1.CellDoc) (kukeonv1.StopCellResult, error)
- func (c *Client) StopContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.StopContainerResult, error)
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 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 (*Client) AttachContainer ¶ added in v0.2.0
func (c *Client) AttachContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.AttachContainerResult, error)
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) CreateCell ¶
func (c *Client) CreateCell(_ context.Context, doc v1beta1.CellDoc) (kukeonv1.CreateCellResult, error)
CreateCell normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.
func (*Client) CreateContainer ¶
func (c *Client) CreateContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.CreateContainerResult, error)
CreateContainer normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.
func (*Client) CreateRealm ¶
func (c *Client) CreateRealm(_ context.Context, doc v1beta1.RealmDoc) (kukeonv1.CreateRealmResult, error)
CreateRealm normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.
func (*Client) CreateSpace ¶
func (c *Client) CreateSpace(_ context.Context, doc v1beta1.SpaceDoc) (kukeonv1.CreateSpaceResult, error)
CreateSpace normalizes the external doc, delegates to the controller, and reshapes the result back into external v1beta1 types.
func (*Client) CreateStack ¶
func (c *Client) CreateStack(_ context.Context, doc v1beta1.StackDoc) (kukeonv1.CreateStackResult, error)
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 (c *Client) DeleteContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.DeleteContainerResult, error)
func (*Client) DeleteRealm ¶
func (*Client) DeleteSpace ¶
func (*Client) DeleteStack ¶
func (*Client) GetContainer ¶
func (c *Client) GetContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.GetContainerResult, error)
func (*Client) KillContainer ¶
func (c *Client) KillContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.KillContainerResult, error)
func (*Client) ListContainers ¶
func (*Client) ListRealms ¶
func (*Client) ListSpaces ¶
func (*Client) ListStacks ¶
func (*Client) Ping ¶
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) PurgeContainer ¶
func (c *Client) PurgeContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.PurgeContainerResult, error)
func (*Client) PurgeRealm ¶
func (*Client) PurgeSpace ¶
func (*Client) PurgeStack ¶
func (*Client) RefreshAll ¶
func (*Client) StartContainer ¶
func (c *Client) StartContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.StartContainerResult, error)
func (*Client) StopContainer ¶
func (c *Client) StopContainer(_ context.Context, doc v1beta1.ContainerDoc) (kukeonv1.StopContainerResult, error)