...

Package ociunify

import "cuelabs.dev/go/oci/ociregistry/ociunify"
Overview
Index

Overview ▾

Package ociunify unifies two OCI registries into one.

func New

func New(r0, r1 ociregistry.Interface, opts *Options) ociregistry.Interface

New returns a registry that unifies the contents from both the given registries. If there's a conflict, (for example a tag resolves to a different thing on both repositories), it returns an error for requests that specifically read the value, or omits the conflicting item for list requests.

Writes write to both repositories. Reads of immutable data come from either.

type Options

type Options struct {
    ReadPolicy ReadPolicy
}

type ReadPolicy

type ReadPolicy int
const (
    ReadSequential ReadPolicy = iota
    ReadConcurrent
)