Documentation ¶
Index ¶
- func AppendDockerAuth(dockerAuths map[string][]docker.AuthConfiguration, ...) map[string][]docker.AuthConfiguration
- func ExtractAuthAttributes(attributes []persistence.Attribute, ...) error
- func ProcessImageFetch(cfg *config.HorizonConfig, client *docker.Client, ...) error
- func SkipCheckFn(client *docker.Client) func(repotag string) (bool, error)
- type FetchCommand
- type ImageFetchWorker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendDockerAuth ¶
func AppendDockerAuth(dockerAuths map[string][]docker.AuthConfiguration, auth docker.AuthConfiguration) map[string][]docker.AuthConfiguration
this function append the docker auth object into the map if it does not exists in the map.
func ExtractAuthAttributes ¶
func ExtractAuthAttributes(attributes []persistence.Attribute, dockerAuthConfigurations map[string][]docker.AuthConfiguration) error
append the auth attribute to the given auth maps
func ProcessImageFetch ¶
func ProcessImageFetch(cfg *config.HorizonConfig, client *docker.Client, containerConfig *events.ContainerConfig, dockerAuthConfigurations map[string][]docker.AuthConfiguration) error
This function is used by external caller such as hzn command to load the container images. containerConfig: it contains the deployment info and the docker auth from the exchange for the service image docker repository. dockerAuthConfigurations: additional docker auths for fetching the container images from the docker repository.
If the images are from a docker repo, the order of docker auths that will be used are 1) from the exchagne (contained in containerConfig) 2) from the dockerAuthConfigurations 3) from the config.DockerCredFilePath file. 4) from /root/.docker/config.json if 3) is not set.
Types ¶
type FetchCommand ¶
type FetchCommand struct {
LaunchContext interface{}
}
func (FetchCommand) ShortString ¶
func (f FetchCommand) ShortString() string
type ImageFetchWorker ¶
type ImageFetchWorker struct { worker.BaseWorker // embedded field // contains filtered or unexported fields }
func NewImageFetchWorker ¶
func NewImageFetchWorker(name string, config *config.HorizonConfig, db *bolt.DB) *ImageFetchWorker
func (*ImageFetchWorker) CommandHandler ¶
func (b *ImageFetchWorker) CommandHandler(command worker.Command) bool
func (*ImageFetchWorker) Messages ¶
func (w *ImageFetchWorker) Messages() chan events.Message
func (*ImageFetchWorker) NewEvent ¶
func (w *ImageFetchWorker) NewEvent(incoming events.Message)
func (*ImageFetchWorker) NewFetchCommand ¶
func (t *ImageFetchWorker) NewFetchCommand(launchContext interface{}) *FetchCommand