api

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const MaxHeaderBytes = 256 * (1 << 10) // 256 KiB

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

func NewHTTP

func NewHTTP(
	cfg config.Application,
	yaclient yandex.Client,
	tgclient telegram.Client,
	dstore ping.Store,
	logger zerolog.Logger,
	nClient *sentry.Client,
	appInfo model.ApplicationInfo,
) (*HTTP, error)

NewHTTP prepares new http service

func (*HTTP) Serve

func (api *HTTP) Serve()

Serve connections

func (*HTTP) Shutdown

func (api *HTTP) Shutdown(ctx context.Context) error

Shutdown the server

type StopInfo

type StopInfo struct {
	Name      string `json:"name,omitempty"`
	Next      string `json:"next,omitempty"`
	RequestID string `json:"request_id,omitempty"`
}

Jump to

Keyboard shortcuts

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