sync

package
v2.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

For testing

Functions

func Init

func Init(ctx context.Context, artifacts []*latest.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

type ContainerSyncer struct{}

func NewContainerSyncer

func NewContainerSyncer() *ContainerSyncer

func (*ContainerSyncer) Sync

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

type Item

type Item struct {
	Image    string
	Artifact *latest.Artifact
	Copy     map[string][]string
	Delete   map[string][]string
}

func NewItem

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

func (*Item) HasChanges

func (i *Item) HasChanges() bool

type NoopSyncer

type NoopSyncer struct{}

func (*NoopSyncer) Sync

type PodSyncer

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

func NewPodSyncer

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

func (*PodSyncer) Sync

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

type SyncerMux []Syncer

func (SyncerMux) Sync

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