Documentation ¶
Index ¶
- func WithAuth(auth transport.AuthMethod) containers.Option[Source]
- func WithCABundle(caCertBytes []byte) containers.Option[Source]
- func WithInsecureTLS(insecureSkipTLS bool) containers.Option[Source]
- func WithPollInterval(tick time.Duration) containers.Option[Source]
- func WithRef(ref string) containers.Option[Source]
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAuth ¶
func WithAuth(auth transport.AuthMethod) containers.Option[Source]
WithAuth returns an option which configures the auth method used by the provided source.
func WithCABundle ¶ added in v1.32.0
func WithCABundle(caCertBytes []byte) containers.Option[Source]
WithCABundle returns an option which configures the CA Bundle used for validating the TLS connection to the provided source.
func WithInsecureTLS ¶ added in v1.32.0
func WithInsecureTLS(insecureSkipTLS bool) containers.Option[Source]
WithInsecureTLS returns an option which configures the insecure TLS setting for the provided source.
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 of storage/fs.FSSource This implementation is backed by a Git repository and it tracks an upstream reference. When subscribing to this source, the upstream reference is tracked by polling the upstream on a configurable interval.
func NewSource ¶
func NewSource(logger *zap.Logger, url string, opts ...containers.Option[Source]) (_ *Source, err error)
NewSource constructs and configures a Source. The source uses the connection and credential details provided to build fs.FS implementations around a target git repository.
func (*Source) Get ¶
Get builds a new store snapshot based on the configure Git remote and reference.
func (*Source) Subscribe ¶
func (s *Source) Subscribe(ctx context.Context, ch chan<- *storagefs.StoreSnapshot)
Subscribe feeds gitfs implementations of fs.FS onto the provided channel. It blocks until the provided context is cancelled (it will be called in a goroutine). It closes the provided channel before it returns.