client

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileLogger

func NewFileLogger(path string) *logrus.Logger

NewFileLogger creates a log file and init logger

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client describes a synchronization client

func NewSyncClient

func NewSyncClient(configFile, authFile, imagesFile, logFile, successImagesFile, outputImagesFormat string,
	routineNum, retries int, osFilterList, archFilterList []string, forceUpdate bool) (*Client, error)

NewSyncClient creates a synchronization client

func (*Client) Run

func (c *Client) Run() error

Run is main function of a synchronization client

type Config

type Config struct {
	// the authentication information of each registry
	AuthList map[string]types.Auth `json:"auth" yaml:"auth"`

	// a <source_repo>:<dest_repo> map
	ImageList map[string]interface{} `json:"images" yaml:"images"`
	// contains filtered or unexported fields
}

Config information of sync client

func NewSyncConfig

func NewSyncConfig(configFile, authFilePath, imageFilePath string,
	osFilterList, archFilterList []string, logger *logrus.Logger) (*Config, error)

NewSyncConfig creates a Config struct

func (*Config) GetAuth

func (c *Config) GetAuth(repository string) (types.Auth, bool)

GetAuth gets the authentication information in Config

Jump to

Keyboard shortcuts

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