daemon.clients.base module

class daemon.clients.base.AsyncBaseClient(uri, logger, timeout=None)[source]

Bases: object

JinaD baseclient (Async)

Parameters
  • uri (str) – the uri of jinad instance

  • logger (JinaLogger) – jinad logger

  • timeout (Optional[int]) – stop waiting for a response after a given number of seconds with the timeout parameter.

async alive(*args, **kwargs)
async status(*args, **kwargs)
async get(*args, **kwargs)
async list(*args, **kwargs)
async clear(*args, **kwargs)
async create(*args, **kwargs)[source]

Create a Workspace/Flow/Pea/Pod on remote. Must be implemented by the inherited class.

# noqa: DAR101 # noqa: DAR102

Return type

Dict

async update(*args, **kwargs)[source]

Update a Workspace/Flow/Pea/Pod on remote. Must be implemented by the inherited class.

# noqa: DAR101 # noqa: DAR102

Return type

Dict

async delete(id, *args, **kwargs)[source]

Delete a Workspace/Flow/Pea/Pod on remote. Must be implemented by the inherited class.

# noqa: DAR101 # noqa: DAR102

Return type

str

async logstream(id, timeout=None)[source]

Websocket log stream from remote Workspace/Flow/Pea/Pod

Parameters
  • id (DaemonID) – identity of the Workspace/Flow/Pea/Pod

  • timeout (Optional[float]) – timeout in seconds for the logstream

class daemon.clients.base.BaseClient(uri, logger, timeout=None)[source]

Bases: daemon.clients.mixin.AsyncToSyncMixin, daemon.clients.base.AsyncBaseClient

JinaD baseclient