Skip to main content

UploadOptions

No overview available.

Methods


createWatcher()

@classmethod
def createWatcher(
_: context.Context,
w: containerwatcher.WatcherType
) - > (containerwatcher.Watcher, error)

Creates a watcher for a container. This method is used to instantiate a mechanism that monitors container events based on the specified watcher type.

Parameters

NameTypeDescription
_context.ContextThe context for the operation, typically used for cancellation or deadlines.
wcontainerwatcher.WatcherTypeThe type of watcher to create, determining its behavior and the events it monitors.

Returns

TypeDescription
(containerwatcher.Watcher, error)A tuple containing the created watcher object and an error if the creation failed.

uploader()

@classmethod
def uploader(
ctx: context.Context
) - > error

Initiates the upload process for outputs. This method is called to transfer local output files to a remote storage location as configured in the UploadOptions.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the upload operation, allowing for cancellation or timeouts.

Returns

TypeDescription
errorAn error object if the upload process encounters any issues, otherwise nil.

Sidecar()

@classmethod
def Sidecar(
ctx: context.Context
) - > error

Executes the sidecar process. This method runs a companion process that typically monitors a local directory for outputs and manages their upload or processing.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the sidecar execution, used for managing its lifecycle and potential cancellation.

Returns

TypeDescription
errorAn error object if the sidecar process encounters any issues during execution, otherwise nil.