sync

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 25 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WorkingDir = docker.RetrieveWorkingDir
	Labels     = docker.RetrieveLabels
	SyncMap    = syncMapForArtifact
)

For testing

Functions

func Init added in v1.6.0

func Init(ctx context.Context, artifacts []*latestV1.Artifact) error

func Perform

func Perform(ctx context.Context, image string, files syncMap, cmdFn func(context.Context, v1.Pod, v1.Container, syncMap) *exec.Cmd, namespaces []string) error

Types

type Config added in v1.7.1

type Config interface {
	GetNamespaces() []string
}

type Item

type Item struct {
	Image  string
	Copy   map[string][]string
	Delete map[string][]string
}

func NewItem

func NewItem(ctx context.Context, a *latestV1.Artifact, e filemon.Events, builds []graph.Artifact, cfg docker.Config, dependentArtifactsCount int) (*Item, error)

type NoopProvider added in v1.27.0

type NoopProvider struct{}

func (*NoopProvider) GetKubernetesSyncer added in v1.27.0

func (p *NoopProvider) GetKubernetesSyncer(_ *kubernetes.ImageList) Syncer

func (*NoopProvider) GetNoopSyncer added in v1.27.0

func (p *NoopProvider) GetNoopSyncer() Syncer

type NoopSyncer added in v1.27.0

type NoopSyncer struct{}

func (*NoopSyncer) Sync added in v1.27.0

func (s *NoopSyncer) Sync(context.Context, *Item) error

type Provider added in v1.27.0

type Provider interface {
	GetKubernetesSyncer(*kubernetes.ImageList) Syncer
	GetNoopSyncer() Syncer
}

func NewSyncProvider added in v1.27.0

func NewSyncProvider(config Config, cli *kubectl.CLI) Provider

type Syncer

type Syncer interface {
	Sync(context.Context, *Item) error
}

type SyncerMux added in v1.27.0

type SyncerMux []Syncer

func (SyncerMux) Sync added in v1.27.0

func (s SyncerMux) Sync(ctx context.Context, item *Item) error

Jump to

Keyboard shortcuts

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