rsync

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

View Source
const (
	RsyncContainer = "rsync"
)

Variables

This section is empty.

Functions

Types

type ArchiveFiles

type ArchiveFiles bool

func (ArchiveFiles) ApplyTo

func (a ArchiveFiles) ApplyTo(opts *TransferOptions) error

type CommandOptions

type CommandOptions struct {
	Recursive     bool
	SymLinks      bool
	Permissions   bool
	ModTimes      bool
	DeviceFiles   bool
	SpecialFiles  bool
	Groups        bool
	Owners        bool
	HardLinks     bool
	Delete        bool
	Partial       bool
	BwLimit       *int
	HumanReadable bool
	LogFile       string
	Info          []string
	ExcludeFiles  []string
	Extras        []string
}

CommandOptions defines options that can be customized in the Rsync command

func (*CommandOptions) AsRsyncCommandOptions

func (c *CommandOptions) AsRsyncCommandOptions() ([]string, error)

AsRsyncCommandOptions returns validated rsync options and validation errors as two lists

type DeleteDestination

type DeleteDestination bool

func (DeleteDestination) ApplyTo

func (d DeleteDestination) ApplyTo(opts *TransferOptions) error

type DestinationContainerMutation

type DestinationContainerMutation struct {
	C *v1.Container
}

func (DestinationContainerMutation) ApplyTo

type DestinationPodSpecMutation

type DestinationPodSpecMutation struct {
	Spec *v1.PodSpec
}

func (*DestinationPodSpecMutation) ApplyTo

type ExcludeFiles added in v0.0.9

type ExcludeFiles []string

func (ExcludeFiles) ApplyTo added in v0.0.9

func (e ExcludeFiles) ApplyTo(opts *TransferOptions) error
type MungeSymlinks bool

func (MungeSymlinks) ApplyTo added in v0.0.11

func (e MungeSymlinks) ApplyTo(opts *TransferOptions) error

type Password

type Password string

func (Password) ApplyTo

func (p Password) ApplyTo(opts *TransferOptions) error

type PreserveOwnership

type PreserveOwnership bool

func (PreserveOwnership) ApplyTo

func (p PreserveOwnership) ApplyTo(opts *TransferOptions) error

type RsyncClientImage

type RsyncClientImage string

func (RsyncClientImage) ApplyTo

func (r RsyncClientImage) ApplyTo(opts *TransferOptions) error

type RsyncServerImage

type RsyncServerImage string

func (RsyncServerImage) ApplyTo

func (r RsyncServerImage) ApplyTo(opts *TransferOptions) error

type RsyncTransfer

type RsyncTransfer struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

func (*RsyncTransfer) CreateClient

func (r *RsyncTransfer) CreateClient(c client.Client) error

func (*RsyncTransfer) CreateServer

func (r *RsyncTransfer) CreateServer(c client.Client) error

func (*RsyncTransfer) Destination

func (r *RsyncTransfer) Destination() client.Client

func (*RsyncTransfer) Endpoint

func (r *RsyncTransfer) Endpoint() endpoint.Endpoint

func (*RsyncTransfer) IsServerHealthy

func (r *RsyncTransfer) IsServerHealthy(c client.Client) (bool, error)

func (*RsyncTransfer) PVCs

func (*RsyncTransfer) Password

func (r *RsyncTransfer) Password() string

func (*RsyncTransfer) Source

func (r *RsyncTransfer) Source() client.Client

func (*RsyncTransfer) Transport

func (r *RsyncTransfer) Transport() transport.Transport

func (*RsyncTransfer) Username

func (r *RsyncTransfer) Username() string

type SourceContainerMutation

type SourceContainerMutation struct {
	C *v1.Container
}

func (SourceContainerMutation) ApplyTo

type SourcePodSpecMutation

type SourcePodSpecMutation struct {
	Spec *v1.PodSpec
}

func (*SourcePodSpecMutation) ApplyTo

func (s *SourcePodSpecMutation) ApplyTo(opts *TransferOptions) error

type StandardProgress

type StandardProgress bool

func (StandardProgress) ApplyTo

func (s StandardProgress) ApplyTo(opts *TransferOptions) error

type TransferOption

type TransferOption interface {
	ApplyTo(*TransferOptions) error
}

TransferOption knows how to apply a user provided option to a given TransferOptions

func GetRsyncCommandDefaultOptions

func GetRsyncCommandDefaultOptions() []TransferOption

type TransferOptions

type TransferOptions struct {
	CommandOptions
	SourcePodMeta            transfer.ResourceMetadata
	DestinationPodMeta       transfer.ResourceMetadata
	SourcePodMutations       []meta.PodSpecMutation
	DestinationPodMutations  []meta.PodSpecMutation
	SourceContainerMutations []meta.ContainerMutation
	DestContainerMutations   []meta.ContainerMutation
	// contains filtered or unexported fields
}

TransferOptions defines customizeable options for Rsync Transfer

func (*TransferOptions) Apply

func (t *TransferOptions) Apply(opts ...TransferOption) error

type Username

type Username string

func (Username) ApplyTo

func (u Username) ApplyTo(opts *TransferOptions) error

type WithDestinationPodLabels

type WithDestinationPodLabels map[string]string

func (WithDestinationPodLabels) ApplyTo

type WithOwnerReferences

type WithOwnerReferences []metav1.OwnerReference

func (WithOwnerReferences) ApplyTo

func (w WithOwnerReferences) ApplyTo(opts *TransferOptions) error

type WithSourcePodLabels

type WithSourcePodLabels map[string]string

func (WithSourcePodLabels) ApplyTo

func (w WithSourcePodLabels) ApplyTo(opts *TransferOptions) error

Jump to

Keyboard shortcuts

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