Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry interface {
Start(ctx context.Context) error
Stop(ctx context.Context) error
Address() string
Push(ctx context.Context, imageName, tag, ociTarPath string) error
IsLocal() bool
}
Registry manages an OCI registry for staging local base images.
func NewRegistry ¶
func NewRegistry(dataDir string, registryConfig *model.RegistryConfig) (Registry, error)
NewRegistry creates a Registry based on the environment. In CI (CI env var set), it returns a remote registry passthrough. The registry address is resolved with the following precedence:
- CONTAINER_HIVE_REGISTRY env var
- registry.address from hive.yml (passed via registryConfig)
Otherwise, it returns an embedded zot registry for local builds. The dataDir parameter sets persistent storage for the local registry; if empty, a temporary directory is used.
type RemoteRegistry ¶
type RemoteRegistry struct {
// contains filtered or unexported fields
}
RemoteRegistry is a passthrough registry for CI environments. Start and Stop are no-ops; Push pushes to the configured remote registry.
func NewRemoteRegistry ¶
func NewRemoteRegistry(address string) *RemoteRegistry
NewRemoteRegistry creates a remote registry with the given address.
func (*RemoteRegistry) Address ¶
func (r *RemoteRegistry) Address() string
func (*RemoteRegistry) IsLocal ¶
func (r *RemoteRegistry) IsLocal() bool
type ZotRegistry ¶
type ZotRegistry struct {
// contains filtered or unexported fields
}
ZotRegistry is an embedded OCI registry for local development builds. It runs zot in-process on a random port.
func NewZotRegistry ¶
func NewZotRegistry(dataDir string) *ZotRegistry
NewZotRegistry creates a new ZotRegistry instance. If dataDir is non-empty, it is used as persistent storage (created if needed). Otherwise a temporary directory is used and cleaned up on Stop.
func (*ZotRegistry) Address ¶
func (z *ZotRegistry) Address() string
func (*ZotRegistry) IsLocal ¶
func (z *ZotRegistry) IsLocal() bool