application

package
v0.0.1-0...-6deec57 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
}

Adapter interface

type App

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

App represents application service

func New

func New() *App

New provides new service application

func (*App) AddAdapters

func (app *App) AddAdapters(adapters ...Adapter)

AddAdapters adds adapters to application service

func (*App) Run

func (app *App) Run(ctx context.Context)

Run runs the service application

func (*App) WithShutdownTimeout

func (app *App) WithShutdownTimeout(timeout time.Duration)

WithShutdownTimeout overrides default shutdown timout

type DebugAdapter

type DebugAdapter struct {
	*http.Server
}

DebugAdapter ./...

func NewDebugAdapter

func NewDebugAdapter(address string) *DebugAdapter

NewDebugAdapter provides new debug adapter /debug/pprof - Added to the default mux by importing the net/http/pprof package. /debug/vars - Added to the default mux by importing the expvar package.

func (*DebugAdapter) Start

func (adapter *DebugAdapter) Start(ctx context.Context) error

Start start http application adapter

func (*DebugAdapter) Stop

func (adapter *DebugAdapter) Stop(ctx context.Context) error

Stop stops http application adapter

Jump to

Keyboard shortcuts

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