Interface ISerializer<Request, Response>

Serializes and deserializes the OTLP request/response to and from Uint8Array

interface ISerializer<Request, Response> {
    deserializeResponse(data: Uint8Array): Response;
    serializeRequest(request: Request): undefined | Uint8Array;
}

Type Parameters

  • Request
  • Response

Methods

  • Deserialize the response from the backend. The response is expected to be in the form of a Uint8Array and will be deserialized into the expected response type.

    Parameters

    • data: Uint8Array

    Returns Response

    the deserialized response

    if the deserialization fails