Documentation ¶
Index ¶
- Variables
- func CopyVersion(printer common.Printer, log logging.Logger, hist common.History, ...) (rerr error)
- func Logger(c ContextProvider, keyValuePairs ...interface{}) logging.Logger
- func NewDefaultTransferHandler() transferhandler.TransferHandler
- func NewTransferHandler(list ...transferhandler.TransferOption) (h transferhandler.TransferHandler, ferr error)
- func SetDefaultTransferHandlerFactory(f func() transferhandler.TransferHandler)
- func Transfer(cv ocm.ComponentVersionAccess, tgt ocm.Repository, optlist ...TransferOption) error
- func TransferComponents(printer common.Printer, closure TransportClosure, repo ocm.Repository, ...) error
- func TransferVersion(printer common.Printer, closure TransportClosure, ...) error
- func TransferWithHandler(pr common.Printer, cv ocm.ComponentVersionAccess, tgt ocm.Repository, ...) error
- func WithPrinter(p common.Printer) transferhandler.TransferOption
- type ContextProvider
- type TransferHandler
- type TransferOption
- type TransferOptions
- type TransportClosure
- type WalkingState
Constants ¶
This section is empty.
Variables ¶
var Breakpoints = false
var REALM = ocmlog.DefineSubRealm("OCM transfer handling", "transfer")
Functions ¶
func CopyVersion ¶
func CopyVersion(printer common.Printer, log logging.Logger, hist common.History, src ocm.ComponentVersionAccess, t ocm.ComponentVersionAccess, handler TransferHandler) (rerr error)
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 ¶
func WithPrinter(p common.Printer) transferhandler.TransferOption
WithPrinter provides a explicit printer object. By default, a non-printing printer will be used.
Types ¶
type ContextProvider ¶
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{}]
Source Files ¶
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. |