Documentation ¶
Overview ¶
Package app provides types and methods used starting Core application instance.
Index ¶
- type Application
- func (a *Application) AddAPIHandler(route string, handler http.Handler) *mux.Route
- func (a *Application) AddHandler(route string, handler http.Handler) *mux.Route
- func (a *Application) PingHandler() http.HandlerFunc
- func (a *Application) Start() error
- func (a *Application) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application defines Core deamon instance.
func NewApplication ¶
NewApplication returns new Application from the provided parameters.
func (*Application) AddAPIHandler ¶
AddAPIHandler adds handler to the HTTP server API router and returns mux.Route instance.
func (*Application) AddHandler ¶
AddHandler adds handler to the HTTP server router and returns mux.Route instance.
func (*Application) PingHandler ¶
func (a *Application) PingHandler() http.HandlerFunc
PingHandler returns an http.HandlerFunc that handles ping requests.
func (*Application) Start ¶
func (a *Application) Start() error
Start starts Application HTTP server.
Click to show internal directories.
Click to hide internal directories.