Documentation ¶
Overview ¶
Package follower defines the Follower type. It is used to track a specific artifact version denoted by its tag. Periodically it checks if a new version has been pushed and if so pulls and installs it in a given directory. Each Follower can track only one artifact, if you need to track multiple artiacts then instantiate a follower for each one.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { WaitGroup *sync.WaitGroup // CloseChan used to close the follower. CloseChan <-chan bool // Resync time after which periodically it checks for new a new version. Resync cron.Schedule // RulesfilesDir directory where the rulesfile are stored. RulesfilesDir string // PluginsDir directory where plugins are stored. PluginsDir string // AssetsDir directory where assets are stored. AssetsDir string // ArtifactReference reference to the artifact in a remote repository. ArtifactReference string // PlainHTTP is set to true if all registry interaction must be in plain http. PlainHTTP bool // TmpDir directory where to save temporary files. TmpDir string // DiginfraVersions is a struct containing all the required Diginfra versions that this follower // has to take into account when installing artifacts. DiginfraVersions config.DiginfraVersions // AllowedTypes specify a list of artifacts that we are allowed to download. AllowedTypes oci.ArtifactTypeSlice // Signature has the data needed for signature checking Signature *index.Signature }
Config configuration options for the Follower.
type Follower ¶
type Follower struct { *ocipuller.Puller *Config config.DiginfraVersions *output.Printer // contains filtered or unexported fields }
Follower knows how to track an artifact in a remote repository given the reference. It starts a new goroutine to check for updates periodically. If an update is available it pulls the new version and installs it in the correct directory.