oci

package
v1.31.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithPollInterval

func WithPollInterval(tick time.Duration) containers.Option[Source]

WithPollInterval configures the interval in which origin is polled to discover any updates to the target reference.

Types

type Source

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

Source is an implementation fs.SnapshotSource backed by OCI repositories It fetches instances of OCI manifests and uses them to build snapshots from their contents

func NewSource

func NewSource(logger *zap.Logger, store *oci.Store, ref oci.Reference, opts ...containers.Option[Source]) (_ *Source, err error)

NewSource constructs and configures a Source. The source uses the connection and credential details provided to build *storagefs.StoreSnapshot implementations around a target git repository.

func (*Source) Get

Get builds a single instance of an *storagefs.StoreSnapshot

func (*Source) String

func (s *Source) String() string

func (*Source) Subscribe

func (s *Source) Subscribe(ctx context.Context, ch chan<- *storagefs.StoreSnapshot)

Subscribe feeds implementations of *storagefs.StoreSnapshot onto the provided channel. It should block until the provided context is cancelled (it will be called in a goroutine). It should close the provided channel before it returns.

Jump to

Keyboard shortcuts

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