Skip to main content

AsyncClient

This class provides an asynchronous interface for interacting with a catalog service. It supports operations to download existing entries and upload new entries to the catalog.

Methods


Download()

@classmethod
def Download(
ctx: context.Context,
requests: [DownloadRequest](downloadrequest.md?sid=flyteplugins_go_tasks_pluginmachinery_catalog_downloadrequest)
) - > outputFuture DownloadFuture

Returns if an entry exists for the given task and input. It returns the data as a LiteralMap

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
requests[DownloadRequest](downloadrequest.md?sid=flyteplugins_go_tasks_pluginmachinery_catalog_downloadrequest)The download request containing details about the data to be downloaded.

Returns

TypeDescription
outputFuture DownloadFutureA future that will resolve to the downloaded data as a LiteralMap, or an error if the download fails.

Upload()

@classmethod
def Upload(
ctx: context.Context,
requests: [UploadRequest](uploadrequest.md?sid=flyteplugins_go_tasks_pluginmachinery_catalog_uploadrequest)
) - > putFuture UploadFuture

Adds a new entry to catalog for the given task execution context and the generated output

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the request, used for cancellation and deadlines.
requests[UploadRequest](uploadrequest.md?sid=flyteplugins_go_tasks_pluginmachinery_catalog_uploadrequest)The upload request containing the task execution context and the output to be uploaded.

Returns

TypeDescription
putFuture UploadFutureA future that will resolve when the upload is complete, or an error if the upload fails.