imagefetch

package
v3.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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.

func SkipCheckFn

func SkipCheckFn(client *docker.Client) func(repotag string) (bool, error)

TODO: user needs to use image IDs instead of repotags to avoid overwriting or otherwise mistaken handling because of name collisions

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

Jump to

Keyboard shortcuts

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