app

package
v0.0.0-...-591eb45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2019 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package app provides types and methods used starting Core application instance.

Index

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

func NewApplication(config *config.Config, dbClient *storage.Client) (*Application, error)

NewApplication returns new Application from the provided parameters.

func (*Application) AddAPIHandler

func (a *Application) AddAPIHandler(route string, handler http.Handler) *mux.Route

AddAPIHandler adds handler to the HTTP server API router and returns mux.Route instance.

func (*Application) AddHandler

func (a *Application) AddHandler(route string, handler http.Handler) *mux.Route

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.

func (*Application) Stop

func (a *Application) Stop(ctx context.Context) error

Stop stops Application HTTP server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL