Skip to content

Channels

Service management and dependency injection framework.

DispatchJSONChannel()

Bases: HTTPXChannel

A channel that calls a POST on the endpoint ìnvoke sending a request body containing information on the called component, service and method and the arguments.

DispatchMSPackChannel()

Bases: HTTPXChannel

A channel that sends a POST on the ìnvoke endpointwith an msgpack encoded request body.

HTTPXChannel()

Bases: Channel

A channel using the httpx clients.

TokenContext

TokeContext covers two context locals for both the access and - optional - refresh topen

Protobuf channel and utilities

ProtobufBuilder()

used to infer protobuf services and messages given component and service structures.

to_proto_type(module_origin, py_type)

Convert Python type to protobuf (field_type, label, type_name). Returns: - field_type: int (descriptor_pb2.FieldDescriptorProto.TYPE_) - label: int (descriptor_pb2.FieldDescriptorProto.LABEL_) - type_name: Optional[str] (fully qualified message name for messages)

ProtobufChannel(manager, protobuf_manager)

Bases: HTTPXChannel

channel, encoding requests and responses with protobuf

get_inner_type(typ)

Extract the inner type from List[InnerType], Optional[InnerType], etc.