Documentation ¶
Index ¶
- type GRPC
- type LogHandler
- type WebAPI
- func (api *WebAPI) RegisterAdminRoutes(prefix string)
- func (api *WebAPI) RegisterDebugRoutes(prefix string)
- func (api *WebAPI) RegisterHealthRoutes(prefix string)
- func (api *WebAPI) RegisterRoute(method, route string, handler func(context echo.Context) error)
- func (api *WebAPI) Start() error
- func (api *WebAPI) Static(prefix, root string)
- func (api *WebAPI) Stop() error
- type WebAPIOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPC ¶
GRPC controller.
func NewGRPC ¶
NewGRPC creates a new gRPC controller and respective API. TODO: convert parameters to a Configuration struct
func (*GRPC) IsRunning ¶
IsRunning returns true if the gRPC service is running and listening for connections.
type LogHandler ¶ added in v0.2.3
LogHandler ...
type WebAPI ¶
WebAPI ...
func (*WebAPI) RegisterAdminRoutes ¶ added in v0.1.2
RegisterAdminRoutes registers preset handlers for <prefix>/admin/shutdown
func (*WebAPI) RegisterDebugRoutes ¶ added in v0.1.2
RegisterDebugRoutes registers preset handlers for <prefix>/debug/profile/cpu and <prefix>/debug/profile/mem
func (*WebAPI) RegisterHealthRoutes ¶ added in v0.1.2
RegisterHealthRoutes registers preset handlers for <prefix>/health/stats.
func (*WebAPI) RegisterRoute ¶
RegisterRoute registers a new handler for a route.
type WebAPIOption ¶ added in v0.2.0
type WebAPIOption func(api *WebAPI)
WebAPIOption is the functional parameter type used to configure WebAPI.
func WithWebAPILogHandler ¶ added in v0.2.3
func WithWebAPILogHandler(lh LogHandler) WebAPIOption
WithWebAPILogHandler allows seting a log handler for doing request logging instead of the default WebAPI logger.
func WithWebAPILogger ¶ added in v0.2.0
func WithWebAPILogger(l log.Logger) WebAPIOption
WithWebAPILogger returns an option to set the WebAPI logger.