xgovern

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

*

  • @Author: yangon
  • @Description
  • @Date: 2020/12/25 17:35 *

*

  • @Author: yangon
  • @Description
  • @Date: 2020/12/25 17:33 *

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