sync

package
v1.37.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 26 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, kubeContext string) error

Types

type ContainerSyncer added in v1.30.0

type ContainerSyncer struct{}

func NewContainerSyncer added in v1.30.0

func NewContainerSyncer() *ContainerSyncer

func (*ContainerSyncer) Sync added in v1.30.0

func (s *ContainerSyncer) Sync(ctx context.Context, _ io.Writer, item *Item) error

type Item

type Item struct {
	Image    string
	Artifact *v1.Artifact
	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)

func (*Item) HasChanges added in v1.28.0

func (i *Item) HasChanges() bool

type NoopSyncer added in v1.27.0

type NoopSyncer struct{}

func (*NoopSyncer) Sync added in v1.27.0

type PodSyncer added in v1.28.0

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

func NewPodSyncer added in v1.28.0

func NewPodSyncer(cli *pkgkubectl.CLI, namespaces *[]string, formatter logger.Formatter) *PodSyncer

func (*PodSyncer) Sync added in v1.28.0

func (s *PodSyncer) Sync(ctx context.Context, out io.Writer, item *Item) error

type Syncer

type Syncer interface {
	Sync(context.Context, io.Writer, *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, out io.Writer, item *Item) error

Jump to

Keyboard shortcuts

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