Module grpc_lib

Data Types

cert()

cert() = term()

Function Index

auth_fun/1returns a function that can be used to authenticate against the keys that are stored in a certain directory.
decode_input/4Decode input protobuf message to map.
encode_output/4Encode response message (map) to binary protobuf message.
keytake/3Get the value for a certain key from a list and remove it from the list.
maybe_decode_header/1Decode header from Base64 if the header name ends with "-bin".
maybe_encode_header/1Encode header using Base64 if the header name ends with "-bin".
maybe_encode_headers/1Encode the header values to Base64 for those headers that have the name ending with "-bin".

Function Details

auth_fun/1

auth_fun(Directory::string()) -> fun((cert()) -> {true, string()} | false)

returns a function that can be used to authenticate against the keys that are stored in a certain directory. The base name of the key file is used as the identity.

decode_input/4

decode_input(ServiceName::atom(), RpcName::atom(), DecoderModule::module(), Message::binary() | eof) -> map() | eof

Decode input protobuf message to map.

encode_output/4

encode_output(ServiceName::atom(), RpcName::atom(), DecoderModule::module(), Message::map()) -> binary()

Encode response message (map) to binary protobuf message.

keytake/3

keytake(Key::term(), KVList::[{term(), term()}], Default::term()) -> {Value::term(), NewKVList::[{term(), term()}]}

Get the value for a certain key from a list and remove it from the list.

Returns the value (or the default, if it was not found) and the list with this key removed.

maybe_decode_header/1

maybe_decode_header(Header::{grpc:metadata_key(), grpc:metadata_value()}) -> {grpc:metadata_key(), grpc:metadata_value()}

Decode header from Base64 if the header name ends with "-bin".

maybe_encode_header/1

maybe_encode_header(Header::{grpc:metadata_key(), grpc:metadata_value()}) -> {grpc:metadata_key(), grpc:metadata_value()}

Encode header using Base64 if the header name ends with "-bin".

maybe_encode_headers/1

maybe_encode_headers(Headers::grpc:meta_data()) -> grpc:meta_data()

Encode the header values to Base64 for those headers that have the name ending with "-bin".


Generated by EDoc