rsync

package
v0.0.0-...-5f9e29a Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RsyncContainer = "rsync"
)

Variables

This section is empty.

Functions

func APIsToWatch

func APIsToWatch() ([]ctrlclient.Object, error)

APIsToWatch give a list of APIs to watch if using this package to deploy the endpoint

func AddToScheme

func AddToScheme(scheme *runtime.Scheme) error

AddToScheme should be used as soon as scheme is created to add kube objects for encoding/decoding required in this package

func NewClient

func NewClient(ctx context.Context, c ctrlclient.Client,
	pvcList transfer.PVCList,
	t transport.Transport,
	logger logr.Logger,
	nameSuffix string,
	labels map[string]string,
	ownerRefs []metav1.OwnerReference,
	podOptions transfer.PodOptions) (transfer.Client, error)

In order to generate the right RBAC, add the following lines to the Reconcile function annotations. +kubebuilder:rbac:groups=core,resources=pods;serviceaccounts;secrets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=roles;rolebindings,verbs=get;list;watch;create;update;patch;delete

func NewDefaultOptionsFrom

func NewDefaultOptionsFrom(opts ...Applier) transfer.CommandOptions

func NewServer

func NewServer(ctx context.Context, c ctrlclient.Client, logger logr.Logger,
	pvcList transfer.PVCList,
	t transport.Transport,
	e endpoint.Endpoint,
	labels map[string]string,
	ownerRefs []metav1.OwnerReference,
	podOptions transfer.PodOptions) (transfer.Server, error)

In order to generate the right RBAC, add the following lines to the Reconcile function annotations. +kubebuilder:rbac:groups=core,resources=secrets;configmaps;pods;serviceaccounts,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=roles;rolebindings,verbs=get;list;watch;create;update;patch;delete

func NewServerWithStunnelRoute

func NewServerWithStunnelRoute(ctx context.Context, c ctrlclient.Client, logger logr.Logger,
	pvcList transfer.PVCList,
	labels map[string]string,
	ownerRefs []metav1.OwnerReference,
	podOptions transfer.PodOptions) (transfer.Server, error)

In order to generate the right RBAC, add the following lines to the Reconcile function annotations. +kubebuilder:rbac:groups=core,resources=services;secrets;configmaps;pods;serviceaccounts,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=roles;rolebindings,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=route.openshift.io,resources=routes,verbs=get;list;watch;create;update;patch;delete

Types

type Applier

type Applier interface {
	ApplyTo(options *CommandOptions) error
}

type ArchiveFiles

type ArchiveFiles bool

func (ArchiveFiles) ApplyTo

func (a ArchiveFiles) ApplyTo(opts *CommandOptions) 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
	Extras        []string
}

CommandOptions defines options that can be customized in the Rsync command

func (*CommandOptions) Apply

func (c *CommandOptions) Apply(opts ...Applier) error

func (*CommandOptions) Options

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

Options returns validated rsync options and validation errors as two lists

type DeleteDestination

type DeleteDestination bool

func (DeleteDestination) ApplyTo

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

type PreserveOwnership

type PreserveOwnership bool

func (PreserveOwnership) ApplyTo

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

type StandardProgress

type StandardProgress bool

func (StandardProgress) ApplyTo

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

Jump to

Keyboard shortcuts

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