GrpcMetadataKey

Available in a dev version: 0․11․0-grpc-186

How to configure

expect class GrpcMetadataKey<T>(name: String, marshaller: GrpcMarshaller<T>)(source)

A typed key for metadata entries that uses a GrpcMarshaller to encode and decode values.

Typed keys provide type-safe access to metadata values with automatic serialization and deserialization using the provided marshaller. The key name follows the same requirements as string-based keys (case-insensitive, ASCII characters only).

For non-binary methods (get, getAll, append, remove, removeAll), the marshaller must encode values as ASCII strings and assume an ASCII string from the passed stream. For binary methods (getBinary, getAllBinary, appendBinary, removeBinary, removeAllBinary), the marshaller encodes values as raw bytes.

Parameters

name

the key name (case-insensitive). Must contain only digits (0-9), lowercase letters (a-z), and special characters (-, _, .). Binary keys must end with -bin.

marshaller

the marshaller used to encode and decode values of type T

Type Parameters

T

the type of values associated with this key

actual class GrpcMetadataKey<T>(name: String, marshaller: GrpcMarshaller<T>)(source)

A typed key for metadata entries that uses a GrpcMarshaller to encode and decode values.

Typed keys provide type-safe access to metadata values with automatic serialization and deserialization using the provided marshaller. The key name follows the same requirements as string-based keys (case-insensitive, ASCII characters only).

For non-binary methods (get, getAll, append, remove, removeAll), the marshaller must encode values as ASCII strings and assume an ASCII string from the passed stream. For binary methods (getBinary, getAllBinary, appendBinary, removeBinary, removeAllBinary), the marshaller encodes values as raw bytes.

Parameters

name

the key name (case-insensitive). Must contain only digits (0-9), lowercase letters (a-z), and special characters (-, _, .). Binary keys must end with -bin.

marshaller

the marshaller used to encode and decode values of type T

Type Parameters

T

the type of values associated with this key

actual class GrpcMetadataKey<T>(name: String, val marshaller: GrpcMarshaller<T>)(source)

A typed key for metadata entries that uses a GrpcMarshaller to encode and decode values.

Typed keys provide type-safe access to metadata values with automatic serialization and deserialization using the provided marshaller. The key name follows the same requirements as string-based keys (case-insensitive, ASCII characters only).

For non-binary methods (get, getAll, append, remove, removeAll), the marshaller must encode values as ASCII strings and assume an ASCII string from the passed stream. For binary methods (getBinary, getAllBinary, appendBinary, removeBinary, removeAllBinary), the marshaller encodes values as raw bytes.

Parameters

name

the key name (case-insensitive). Must contain only digits (0-9), lowercase letters (a-z), and special characters (-, _, .). Binary keys must end with -bin.

marshaller

the marshaller used to encode and decode values of type T

Type Parameters

T

the type of values associated with this key

Constructors

Link copied to clipboard
expect constructor(name: String, marshaller: GrpcMarshaller<T>)
actual constructor(name: String, marshaller: GrpcMarshaller<T>)
actual constructor(name: String, marshaller: GrpcMarshaller<T>)

Properties

Link copied to clipboard
Link copied to clipboard