app

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Run(ctx context.Context) (done <-chan struct{}, err error)
	Name() string
}

Application will Run until done or error is returned.

func NewHttpServer

func NewHttpServer(router *mux.Router, port int, name string, opts ...HttpOption) Application

func NewPprofHttpServer

func NewPprofHttpServer(port int) Application

func NewPrometheusMetricsHttpServer

func NewPrometheusMetricsHttpServer(port int) Application

func NewSupervisor

func NewSupervisor(opts ...Option) Application

type HttpOption added in v1.2.0

type HttpOption func(*httpServerConfig)

func WithCors added in v1.2.0

func WithCors(opts ...handlers.CORSOption) HttpOption

type Option

type Option func(*runCfg)

func WithApps

func WithApps(apps ...Application) Option

func WithLogLevel

func WithLogLevel(level log.Level) Option

func WithPprof

func WithPprof(port int) Option

func WithPrometheus

func WithPrometheus(port int) Option

Jump to

Keyboard shortcuts

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