gateway

package
v0.0.0-...-86e4b03 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gateway

type Gateway = errgroup.Group

Gateway processes external requests.

func New

func New(ctx context.Context, opts ...Option) (*Gateway, error)

New creates new Gateway instance

type Option

type Option func(*options)

Option defines Gateway configuration option.

func WithHTTPPort

func WithHTTPPort(v string) Option

WithHTTPPort sets the Gateway http port.

func WithHandlers

func WithHandlers(m map[string]func(http.ResponseWriter, *http.Request)) Option

WithHandlers provides additional handlers to the Gateway.

func WithListenAddress

func WithListenAddress(v string) Option

WithListenAddress sets the Gateway listen address.

func WithLoggerName

func WithLoggerName(v string) Option

WithLoggerName sets the Gateway logger name.

func WithMetricsEnabled

func WithMetricsEnabled(v string) Option

WithMetricsEnabled enables or disables the Gateway metrics.

func WithPprofEnabled

func WithPprofEnabled(v string) Option

WithPprofEnabled enables or disables the Gateway pprof.

Jump to

Keyboard shortcuts

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