temporal_sdk_grpc_adapter behaviour (temporal_sdk v0.1.15)

View Source

gRPC HTTP/2 adapter behaviour module.

Summary

Callbacks

init_adapter(Cluster, AdapterConfig)

-callback init_adapter(Cluster :: temporal_sdk_grpc:cluster_name(), AdapterConfig :: term()) ->
                          ok | {error, term()}.

pools_status(Cluster)

-callback pools_status(Cluster :: temporal_sdk_grpc:cluster_name()) -> term().

request(Cluster, Method, Path, Headers, Body, Opts)

-callback request(Cluster :: temporal_sdk_grpc:cluster_name(),
                  Method :: iodata(),
                  Path :: iodata(),
                  Headers :: temporal_sdk_grpc:headers(),
                  Body :: iodata(),
                  Timeout :: timeout()) ->
                     {ok, Endpoint :: term(), Response :: binary(), RHeaders :: temporal_sdk_grpc:headers()} |
                     {request_error, Endpoint :: term(), ErrorDetails :: term()}.