Documentation
¶
Overview ¶
Package image hosts the `kuke get image` subcommand: cross-realm-by-default image listing under the `kuke get <kind>` family. The previous `kuke image get` (#211) was retired here (#824) so images line up with the other realm-scoped kinds (cells, stacks, …) under the `get` verb.
Image methods are in-process by design (#226) — the kukeond RPC does not serve them — so this leaf wires a `*local.Client` directly the same way `cmd/kuke/image` does. The persistent `--no-daemon` on the `get` parent is therefore a no-op for this leaf: every invocation runs in-process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewImageCmd ¶
NewImageCmd builds the `kuke get image` subcommand. With no positional and no `--realm`, it lists images across every realm. With `--realm <r>` it narrows to one. With a positional `<ref>` it describes that one image (yaml by default, json with `-o json`).
Types ¶
type Client ¶
type Client interface {
io.Closer
ListRealms(ctx context.Context) ([]v1beta1.RealmDoc, error)
ListImages(ctx context.Context, realm string) (kukeonv1.ListImagesResult, error)
GetImage(ctx context.Context, realm, ref string) (kukeonv1.GetImageResult, error)
}
Client is the narrow surface this leaf uses. It is satisfied by `*local.Client` and by per-test fakes. ListRealms is in the set because the cross-realm default fans out across the realm controller's view — images are realm-scoped artefacts and the daemon does not serve them, so the fanout happens here in-process.
type MockControllerKey ¶
type MockControllerKey struct{}
MockControllerKey injects a fake Client via context for tests, mirroring the pattern used by `cmd/kuke/image`.