Documentation
¶
Index ¶
- Variables
- func ArraySortingStream(ctx context.Context, data <-chan *Response, expected int) io.Reader
- func Gzip() echo.MiddlewareFunc
- func GzipWithConfig(config GzipConfig) echo.MiddlewareFunc
- func NewHttpServer(ctx context.Context, appCtx *ApplicationContext) *echo.Echo
- func NewSortingReader(ctx context.Context, data <-chan *Response, expected int) io.Reader
- func StartEcho(e *echo.Echo, addr string, tlsCfg *config.TlsConfig) error
- type ApplicationContext
- type DropLastReader
- type FastJSONSerializer
- type GzipConfig
- type HandleResponse
- type JsonRpcHandler
- func (j *JsonRpcHandler) GetRequestType() protocol.RequestType
- func (j *JsonRpcHandler) IsSingle() bool
- func (j *JsonRpcHandler) RequestCount() int
- func (j *JsonRpcHandler) RequestDecode(ctx context.Context) (*Request, error)
- func (j *JsonRpcHandler) ResponseEncode(response protocol.ResponseHolder) *Response
- type Request
- type RequestHandler
- type Response
- type RestHandler
- type SingleByteReader
- type SortingReader
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultGzipConfig = GzipConfig{ Skipper: emiddleware.DefaultSkipper, Level: -1, }
DefaultGzipConfig is the default Gzip middleware config.
Functions ¶
func ArraySortingStream ¶
func Gzip ¶
func Gzip() echo.MiddlewareFunc
Gzip returns a middleware which compresses HTTP response using gzip compression scheme.
func GzipWithConfig ¶
func GzipWithConfig(config GzipConfig) echo.MiddlewareFunc
GzipWithConfig return Gzip middleware with config. See: `Gzip()`.
func NewHttpServer ¶
func NewHttpServer(ctx context.Context, appCtx *ApplicationContext) *echo.Echo
func NewSortingReader ¶
Types ¶
type ApplicationContext ¶
type ApplicationContext struct {
// contains filtered or unexported fields
}
func NewApplicationContext ¶
func NewApplicationContext( upstreamSupervisor upstreams.UpstreamSupervisor, cacheProcessor caches.CacheProcessor, registry *rating.RatingRegistry, authProcessor auth.AuthProcessor, appConfig *config.AppConfig, storageRegistry *storages.StorageRegistry, ) *ApplicationContext
type DropLastReader ¶
type DropLastReader struct {
// contains filtered or unexported fields
}
type FastJSONSerializer ¶
type FastJSONSerializer struct{}
func (FastJSONSerializer) Deserialize ¶
func (FastJSONSerializer) Deserialize(c echo.Context, i interface{}) error
type GzipConfig ¶
type GzipConfig struct {
// Skipper defines a function to skip middleware.
Skipper emiddleware.Skipper
// Gzip compression level.
// Optional. Default value -1.
Level int `yaml:"level"`
}
GzipConfig defines the config for Gzip middleware.
type HandleResponse ¶
type HandleResponse struct {
// contains filtered or unexported fields
}
func NewHandleResponse ¶
func NewHandleResponse(responseWrappers chan *protocol.ResponseHolderWrapper, corsOrigins []string) *HandleResponse
type JsonRpcHandler ¶
type JsonRpcHandler struct {
// contains filtered or unexported fields
}
func NewJsonRpcHandler ¶
func (*JsonRpcHandler) GetRequestType ¶
func (j *JsonRpcHandler) GetRequestType() protocol.RequestType
func (*JsonRpcHandler) IsSingle ¶
func (j *JsonRpcHandler) IsSingle() bool
func (*JsonRpcHandler) RequestCount ¶
func (j *JsonRpcHandler) RequestCount() int
func (*JsonRpcHandler) RequestDecode ¶
func (j *JsonRpcHandler) RequestDecode(ctx context.Context) (*Request, error)
func (*JsonRpcHandler) ResponseEncode ¶
func (j *JsonRpcHandler) ResponseEncode(response protocol.ResponseHolder) *Response
type Request ¶
type Request struct {
Chain string
UpstreamRequests []protocol.RequestHolder
}
type RequestHandler ¶
type RestHandler ¶
type RestHandler struct {
// contains filtered or unexported fields
}
func NewRestHandler ¶
func (*RestHandler) GetRequestType ¶
func (r *RestHandler) GetRequestType() protocol.RequestType
func (*RestHandler) IsSingle ¶
func (r *RestHandler) IsSingle() bool
func (*RestHandler) RequestCount ¶
func (r *RestHandler) RequestCount() int
func (*RestHandler) RequestDecode ¶
func (r *RestHandler) RequestDecode(ctx context.Context) (*Request, error)
func (*RestHandler) ResponseEncode ¶
func (r *RestHandler) ResponseEncode(response protocol.ResponseHolder) *Response
type SingleByteReader ¶
type SingleByteReader []byte
type SortingReader ¶
type SortingReader struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.