server

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Run() error
	Shutdown() error
	Addr() string
	Name() string
}

type CleanUpHandler

type CleanUpHandler func()

type Option

type Option struct {
	AppName               string
	AppDesc               string
	Version               string
	BuildCommit           string
	BuildDate             string
	ShutdownSigs          []os.Signal
	ShutdownDelayDuration time.Duration
	ConfigPathType        config.PathType
	ConfigIgnoreFileName  bool
	ConfigDefault         string
}

type Provider

type Provider interface {
	RegInit(fs ...RegInitHandler)
	RegServes(fs ...RegServeHandler) error
	Run() error
}

func NewProvider

func NewProvider(opt Option) (Provider, func(), error)

type RegInitHandler added in v0.4.0

type RegInitHandler func(config.Config) error

type RegServeHandler

type RegServeHandler func(config.Config) ([]App, CleanUpHandler, error)

Jump to

Keyboard shortcuts

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