ocireg

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Host     = "cluster.local:5000"
	Audience = "miren-registry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobStore added in v0.16.0

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

BlobStore provides direct, content-addressed access to the registry's blob storage for server-owned artifacts that do not need the OCI upload protocol.

func NewBlobStore added in v0.16.0

func NewBlobStore(dataPath string) *BlobStore

func (*BlobStore) Open added in v0.16.0

func (s *BlobStore) Open(digest string) (*os.File, error)

func (*BlobStore) Put added in v0.16.0

func (s *BlobStore) Put(r io.Reader) (string, int64, error)

type Registry

type Registry struct {
	RootDir string
	Log     *slog.Logger
	EC      *entityserver.Client
	Issuer  *workloadidentity.Issuer
	// contains filtered or unexported fields
}

RegistryHandler processes all OCI registry requests

func NewRegistry added in v0.3.0

func NewRegistry(rootDir string, log *slog.Logger, ec *entityserver.Client, issuer *workloadidentity.Issuer) *Registry

NewRegistry creates a new Registry.

func (*Registry) Shutdown

func (r *Registry) Shutdown(ctx context.Context) error

func (*Registry) Start

func (r *Registry) Start(ctx context.Context, addr string) error

type RegistryHandler

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

func NewRegistryHandler

func NewRegistryHandler(storageRoot string, log *slog.Logger, ec *entityserver.Client) *RegistryHandler

NewRegistryHandler creates a new registry handler with the specified storage location

func (*RegistryHandler) ServeHTTP

func (h *RegistryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements the http.Handler interface.

Every path component is validated against the OCI grammars here, before dispatch, so a handler never sees a name, digest, or upload id that could reach outside the storage root.

Jump to

Keyboard shortcuts

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