Documentation
¶
Index ¶
- Constants
- func FormatterForRelayRequestAndResponse(apiInterface string) (inputFormatter func([]byte) []byte, outputFormatter func([]byte) []byte)
- func FormatterForRelayRequestAndResponseJsonRPC() (inputFormatter func([]byte) []byte, outputFormatter func([]byte) []byte)
- func IdentityFormatter() (inputFormatter func([]byte) []byte, outputFormatter func([]byte) []byte)
Constants ¶
const ( IDFieldName = "id" DefaultIDValue = 1 )
Variables ¶
This section is empty.
Functions ¶
func FormatterForRelayRequestAndResponse ¶
func FormatterForRelayRequestAndResponse(apiInterface string) (inputFormatter func([]byte) []byte, outputFormatter func([]byte) []byte)
FormatterForRelayRequestAndResponse returns input/output formatter functions for the given API interface, used to normalize requests for cache key hashing.
func FormatterForRelayRequestAndResponseJsonRPC ¶
func FormatterForRelayRequestAndResponseJsonRPC() (inputFormatter func([]byte) []byte, outputFormatter func([]byte) []byte)
FormatterForRelayRequestAndResponseJsonRPC returns formatters that strip and restore the JSON-RPC "id" field, enabling cache hits across requests that differ only by id.
Types ¶
This section is empty.