http

package
v1.9.15 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamEmpty liberr.CodeError = iota + libcfg.MinErrorComponentHttp
	ErrorParamInvalid
	ErrorComponentNotInitialized
	ErrorConfigInvalid
	ErrorStartComponent
	ErrorReloadComponent
	ErrorDependencyTLSDefault
	ErrorDependencyLogDefault
)
View Source
const (
	DefaultTlsKey = "tls"
	DefaultLogKey = "log"
	ComponentType = "http"
)

Variables

This section is empty.

Functions

func DefaultConfig added in v1.8.10

func DefaultConfig(indent string) []byte

func Register

func Register(cfg libcfg.Config, key string, cpt ComponentHttp)

func RegisterNew

func RegisterNew(cfg libcfg.Config, key string, tlsKey, logKey string, handler map[string]http.Handler)

func SetDefaultConfig

func SetDefaultConfig(cfg []byte)

Types

type ComponentHttp

type ComponentHttp interface {
	libcfg.Component

	SetTLSKey(tlsKey string)
	SetLOGKey(logKey string)
	SetHandler(handler map[string]http.Handler)

	GetPool() libhts.PoolServer
	SetPool(pool libhts.PoolServer)
}

func Load

func Load(getCpt libcfg.FuncComponentGet, key string) ComponentHttp

func New

func New(tlsKey, logKey string, handler map[string]http.Handler) ComponentHttp

Jump to

Keyboard shortcuts

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