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) 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.