xgovern

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HandleFuncs = make(h)
)

Functions

func GetServer

func GetServer() *http.ServeMux

func GovernReload

func GovernReload(opts ...Option)

func HandleFunc

func HandleFunc(p string, h func(w http.ResponseWriter, r *http.Request))

func Run

func Run(opts ...Option)

func Shutdown

func Shutdown() error

Types

type Config

type Config struct {
	Host    string `mapStructure:"host"`
	Port    int    `mapStructure:"port"`
	Network string `mapStructure:"network"`
}

func DefaultConfig

func DefaultConfig() *Config

func GovernConfig

func GovernConfig() *Config

func (Config) Address

func (config Config) Address() string

type Option

type Option func(c *Config)

func WithHost

func WithHost(host string) Option

func WithNetwork

func WithNetwork(network string) Option

func WithPort

func WithPort(port int) Option

Jump to

Keyboard shortcuts

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