Documentation ¶
Overview ¶
Package v1 provides lstags v1 API to be used both by the application itself and by external projects
Index ¶
- type API
- func (api *API) CollectPushTags(cn *collection.Collection, push PushConfig) (*collection.Collection, error)
- func (api *API) CollectTags(refs ...string) (*collection.Collection, error)
- func (api *API) PullTags(cn *collection.Collection) error
- func (api *API) PushTags(cn *collection.Collection, push PushConfig) error
- type Config
- type PushConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API represents configured application API instance, the main abstraction you are supposed to work with
func (*API) CollectPushTags ¶
func (api *API) CollectPushTags(cn *collection.Collection, push PushConfig) (*collection.Collection, error)
CollectPushTags blends passed collection with information fetched from local "push" registry, makes required comparisons between them and spits organized info back as collection.Collection
func (*API) CollectTags ¶
func (api *API) CollectTags(refs ...string) (*collection.Collection, error)
CollectTags collects information on tags present in remote registry and local Docker daemon, makes required comparisons between them and spits organized info back as collection.Collection
func (*API) PullTags ¶
func (api *API) PullTags(cn *collection.Collection) error
PullTags compares images from remote registry and Docker daemon and pulls images that match tag spec passed and are not present in Docker daemon.
func (*API) PushTags ¶
func (api *API) PushTags(cn *collection.Collection, push PushConfig) error
PushTags compares images from remote and "push" (usually local) registries, pulls images that are present in remote registry, but are not in "push" one and then [re-]pushes them to the "push" registry.
type Config ¶
type Config struct { // DockerJSONConfigFile is a path to Docker JSON config file DockerJSONConfigFile string // ConcurrentRequests defines how much requests to registry we could run in parallel ConcurrentRequests int // WaitBetween defines how much we will wait between batches of requests (incl. pull and push) WaitBetween time.Duration // TraceRequests sets if we will print out registry HTTP request traces TraceRequests bool // RetryRequests defines how much retries we will do to the failed HTTP request RetryRequests int // RetryDelay defines how much we will wait between failed HTTP request and retry RetryDelay time.Duration // InsecureRegistryEx is a regex string to match insecure (non-HTTPS) registries InsecureRegistryEx string // VerboseLogging sets if we will print debug log messages VerboseLogging bool // DryRun sets if we will dry run pull or push DryRun bool }
Config holds API instance configuration
type PushConfig ¶
type PushConfig struct { // Prefix is prepended to the repository path while pushing to the registry Prefix string // Registry is an address of the Docker registry in which we push our images Registry string // UpdateChanged tells us if we will re-push (update/overwrite) images having same tag, but different digest UpdateChanged bool // PathSeparator defines which path separator to use (default: "/") PathSeparator string // PathTemplate is a template to change push path, sprig functions are supprted PathTemplate string // TagTemplate is a template to change push tag, sprig functions are supprted TagTemplate string }
PushConfig holds push-specific configuration (where to push and with which prefix)
Directories ¶
Path | Synopsis |
---|---|
Package collection provides a "container" structure to store Docker registry query results in a well organized and easily accessible form.
|
Package collection provides a "container" structure to store Docker registry query results in a well organized and easily accessible form. |
registry
|
|
client
Package client provides Docker registry client API
|
Package client provides Docker registry client API |