transfer

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Breakpoints = false
View Source
var REALM = ocmlog.DefineSubRealm("OCM transfer handling", "transfer")

Functions

func Logger

func Logger(c ContextProvider, keyValuePairs ...interface{}) logging.Logger

func NewDefaultTransferHandler

func NewDefaultTransferHandler() transferhandler.TransferHandler

func NewTransferHandler

func NewTransferHandler(list ...transferhandler.TransferOption) (h transferhandler.TransferHandler, ferr error)

NewTransferHandler creates a transfer handler for the given set of transfer options. If there is no handler type supporting all the given options an ErrNotSupported error is returned. If no handler can be found according to the origin handlers of given options (an option always belongs to a dedicated option set of a dedicated handler but may be supported by other option sets, also) the options sets of all registered handler types with checked by trying the most significant handlers, first, to find the best matching handler for the given option set.

func SetDefaultTransferHandlerFactory

func SetDefaultTransferHandlerFactory(f func() transferhandler.TransferHandler)

func Transfer

func Transfer(cv ocm.ComponentVersionAccess, tgt ocm.Repository, optlist ...TransferOption) error

Transfer uses the transfer handler based on the given options to control the transfer process. The default handler is the standard handler.

func TransferComponents

func TransferComponents(printer common.Printer, closure TransportClosure, repo ocm.Repository, prefix string, all bool, tgt ocm.Repository, handler TransferHandler) error

func TransferVersion

func TransferVersion(printer common.Printer, closure TransportClosure, src ocmcpi.ComponentVersionAccess, tgt ocmcpi.Repository, handler TransferHandler) error

func TransferWithHandler

func TransferWithHandler(pr common.Printer, cv ocm.ComponentVersionAccess, tgt ocm.Repository, handler TransferHandler) error

TransferWithHandler uses the specified transfer handler to control the transfer process.

func WithPrinter

WithPrinter provides a explicit printer object. By default, a non-printing printer will be used.

Types

type ContextProvider

type ContextProvider interface {
	GetContext() ocm.Context
}

type TransferHandler

type TransferHandler = transferhandler.TransferHandler

TransferHandler controls the transfer of component versions. It can be used to control the value transport of sources and resources on artifact level (by providing specific handling for dedicated artifact attributes), the concrete re/source transfer step, and the way how nested component version are transported. There are two implementations delivered as part of the OCM library:

  • package transferhandler.standard: able to select recursive transfer general value artifact transport.
  • package transferhandler.spiff: controls transfer using a spiff script.

Custom implemetations can be used to gain fine-grained control over the transfer process, whose general flow is handled by a uniform Transfer function.

type TransferOption

type TransferOption = transferhandler.TransferOption

TransferOption if the interface for options given to transfer functions. The can influence the behaviour of the transfer process by configuring appropriate transfer handlers.

type TransferOptions

type TransferOptions = transferhandler.TransferOptions

TransferOptions is the target interface for consumers of a TransferOption.

type TransportClosure

type TransportClosure = common.NameVersionInfo[*struct{}]

type WalkingState

type WalkingState = common.WalkingState[*struct{}, interface{}]

Directories

Path Synopsis
Package transferhandler provides the API for transfer handlers used during the transfer process of an OCM component.
Package transferhandler provides the API for transfer handlers used during the transfer process of an OCM component.

Jump to

Keyboard shortcuts

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