Documentation
¶
Index ¶
- Variables
- func Chain(f http.Handler, m ...func(http.Handler) http.Handler) http.Handler
- func GenerateTlsConfig(g *Config, vegaPaths paths.Paths) (*tls.Config, http.Handler, error)
- func MetricCollectionMiddleware(next http.Handler) http.Handler
- func RemoteAddrMiddleware(log *logging.Logger, next http.Handler) http.Handler
- func WithAddHeadersMiddleware(next http.Handler) http.Handler
- type Config
- type GraphqlServiceConfig
- type InjectableResponseWriter
- type RESTGatewayServiceConfig
- type ServerConfig
- type SubscriptionRateLimiter
- func (s *SubscriptionRateLimiter) Dec(ip string)
- func (s *SubscriptionRateLimiter) Inc(ip string) error
- func (s *SubscriptionRateLimiter) WithGrpcInterceptor(ipGetterFunc ipGetter) grpc.StreamServerInterceptor
- func (s *SubscriptionRateLimiter) WithSubscriptionRateLimiter(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Chain ¶ added in v0.56.0
Chain builds the middleware Chain recursively, functions are first class.
func GenerateTlsConfig ¶ added in v0.67.1
func MetricCollectionMiddleware ¶
MetricCollectionMiddleware records the request and the time taken to service it.
func RemoteAddrMiddleware ¶
RemoteAddrMiddleware is a middleware adding to the current request context the address of the caller.
Types ¶
type Config ¶
type Config struct {
ServerConfig
Level encoding.LogLevel `` /* 148-byte string literal not displayed */
Timeout encoding.Duration `long:"timeout"`
Node ServerConfig `group:"Node" namespace:"node"`
GraphQL GraphqlServiceConfig `group:"GraphQL" namespace:"graphql"`
REST RESTGatewayServiceConfig `group:"REST" namespace:"rest"`
SubscriptionRetries int `description:" " long:"subscription-retries"`
GraphQLPlaygroundEnabled encoding.Bool `description:"Enables the GraphQL playground" long:"graphql-playground"`
MaxSubscriptionPerClient