package
0.0.0-20240916203516-2473a21e2bfc
Repository: https://github.com/kava-labs/kava-proxy-service.git
Documentation: pkg.go.dev

# Packages

The cache status header will be set to: - `HIT` when all requests are cache hits - `MISS` when all requests are cache misses - `PARTIAL` when there is a mix of cache hits and misses.
Package cachemdw is responsible for caching EVM requests and provides corresponding middleware package can work with any underlying storage which implements simple cache.Cache interface package provides two different middlewares: - IsCachedMiddleware (should be run before proxy middleware) - CachingMiddleware (should be run after proxy middleware) IsCachedMiddleware is responsible for setting response in the context if it's in the cache CachingMiddleware is responsible for caching response by taking a value from context (should be set by proxy mdw) and setting in the cache.

# Functions

Call makes an http request to a JSON HTTP api decoding the JSON response to the result interface if non-nil returning error (if any).
CreateRequest isolates duplicate code in creating http search request.
MarshalJSONResponse marshals an interface into the response body and sets JSON content type headers.
New returns a new ProxyService with the specified config and error (if any).
NewError creates a new RequestError.
NewProxies creates a Proxies instance based on the service configuration: - for non-sharding configuration, it returns a HostProxies - for height-based-routing configurations, it returns a PruningOrDefaultProxies.
NewProxyServiceClient creates a new ProxyServiceClient using the provided config, returning the client and error (if any).

# Constants

No description provided by the author
No description provided by the author
Service defined context keys.
No description provided by the author
Values defined by upstream services.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ResponseBackend values for metric reporting of where request was routed.
ResponseBackend values for metric reporting of where request was routed.
ResponseBackend values for metric reporting of where request was routed.
No description provided by the author

# Structs

DatabaseStatusResponse wraps values returned by calls to /status/database.
HostProxies chooses a proxy based solely on the Host of the incoming request, and the host -> backend url map defined in the config.
ProxyMetadata wraps details about the proxy used for a request.
ProxyService represents an instance of the proxy service API.
ProxyServiceClient provides a client for making requests and decoding responses to the proxy service API.
ProxyServiceClientConfig wraps values used to create a new ProxyServiceClient.
PruningOrDefaultProxies routes traffic based on the host _and_ the height of the query.
RequestError provides additional details about the failed request.
ShardProxies handles routing requests for specific heights to backends that contain the height.

# Interfaces

Proxies is an interface for getting a reverse proxy for a given request.

# Type aliases

RequestInterceptors (a.k.a.