viam.resource.rpc_client_base

Classes

ResourceRPCClientBase

Base RPC client for a resource.

ReconfigurableResourceRPCClientBase

A base RPC client that can reset its channel.

Module Contents

class viam.resource.rpc_client_base.ResourceRPCClientBase[source]

Bases: Protocol

Base RPC client for a resource. Resource RPC clients must inherit from this class

channel: grpclib.client.Channel
client: Any
class viam.resource.rpc_client_base.ReconfigurableResourceRPCClientBase[source]

Bases: ResourceRPCClientBase

A base RPC client that can reset its channel.

Useful if connection is lost and then regained.

reset_channel(channel: grpclib.client.Channel)[source]

Called when the RPC channel was reset. Passes in the new channel.

Parameters:

channel (Channel) – The new RPC Channel