http

package
v1.8.11 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamsEmpty liberr.CodeError = iota + libcfg.MinErrorComponentHttp
	ErrorParamsInvalid
	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 IsCodeError

func IsCodeError() bool

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