sync

package
v0.0.0-...-dc266b9 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const RegexpPrefix = "regex:"

Variables

This section is empty.

Functions

This section is empty.

Types

type ListerConfig

type ListerConfig struct {
	MaxItems      int           `yaml:"maxItems"`
	CacheDuration time.Duration `yaml:"cacheDuration"`
}

type Location

type Location struct {
	Registry      string            `yaml:"registry"`
	Auth          string            `yaml:"auth"`
	SkipTLSVerify bool              `yaml:"skip-tls-verify"`
	AuthRefresh   *time.Duration    `yaml:"auth-refresh"`
	ListerConfig  map[string]string `yaml:"lister"`
	ListerType    registry.ListSourceType
	// contains filtered or unexported fields
}

func (*Location) GetAuth

func (l *Location) GetAuth() string

func (*Location) GetECR

func (l *Location) GetECR() (bool, bool, string, string)

func (*Location) IsECR

func (l *Location) IsECR() (bool, bool)

func (*Location) IsGCR

func (l *Location) IsGCR() bool

func (*Location) RefreshAuth

func (l *Location) RefreshAuth() error

type Mapping

type Mapping struct {
	From     string   `yaml:"from"`
	To       string   `yaml:"to"`
	Tags     []string `yaml:"tags"`
	Platform string   `yaml:"platform"`
	// contains filtered or unexported fields
}

type Relay

type Relay interface {
	Prepare() error
	Dispose() error
	Sync(opt *relays.SyncOptions) error
}

type Sync

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

func New

func New(conf *SyncConfig) (*Sync, error)

func (*Sync) Dispose

func (s *Sync) Dispose()

func (*Sync) Shutdown

func (s *Sync) Shutdown()

func (*Sync) SyncFromConfig

func (s *Sync) SyncFromConfig(conf *SyncConfig, taskFilter string) (bool, error)

func (*Sync) WaitForTick

func (s *Sync) WaitForTick()

type SyncConfig

type SyncConfig struct {
	Relay      string              `yaml:"relay"`
	Docker     *docker.RelayConfig `yaml:"docker"`
	Skopeo     *skopeo.RelayConfig `yaml:"skopeo"`
	DockerHost string              `yaml:"dockerhost"`  // DEPRECATED
	APIVersion string              `yaml:"api-version"` // DEPRECATED
	Lister     *ListerConfig       `yaml:"lister"`
	Tasks      []*Task             `yaml:"tasks"`
	Watch      *bool               `yaml:"watch,omitempty"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(file string) (*SyncConfig, error)

func (*SyncConfig) ValidateSupport

func (c *SyncConfig) ValidateSupport(s relays.Support) error

type Task

type Task struct {
	Name     string     `yaml:"name"`
	Interval int        `yaml:"interval"`
	Source   *Location  `yaml:"source"`
	Target   *Location  `yaml:"target"`
	Mappings []*Mapping `yaml:"mappings"`
	Verbose  bool       `yaml:"verbose"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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