egovernor

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: MIT Imports: 17 Imported by: 14

Documentation

Index

Constants

View Source
const PackageName = "server.egin"

Variables

View Source
var (
	// DefaultServeMux ...
	DefaultServeMux = http.NewServeMux()
)

Functions

func HandleFunc

func HandleFunc(pattern string, handler http.HandlerFunc)

HandleFunc ...

Types

type Component

type Component struct {
	*http.Server
	// contains filtered or unexported fields
}

Component ...

func (*Component) GracefulStop

func (s *Component) GracefulStop(ctx context.Context) error

GracefulStop ..

func (*Component) Info

func (s *Component) Info() *server.ServiceInfo

Info ..

func (*Component) Init

func (c *Component) Init() error

func (*Component) Name

func (c *Component) Name() string

func (*Component) PackageName

func (c *Component) PackageName() string

func (*Component) Start

func (s *Component) Start() error

Serve ..

func (*Component) Stop

func (s *Component) Stop() error

Stop ..

type Config

type Config struct {
	Host    string
	Port    int
	Network string
}

func DefaultConfig

func DefaultConfig() *Config

func (Config) Address

func (config Config) Address() string

type Container

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

func DefaultContainer

func DefaultContainer() *Container

func Load

func Load(key string) *Container

func (*Container) Build

func (c *Container) Build(options ...Option) *Component

type Option added in v0.3.3

type Option func(c *Container)

func WithHost added in v0.3.3

func WithHost(host string) Option

func WithPort added in v0.3.3

func WithPort(port int) Option

Jump to

Keyboard shortcuts

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