pool

package
v1.13.10 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorParamEmpty liberr.CodeError = iota + liberr.MinPkgHttpServerPool
	ErrorPoolAdd
	ErrorPoolValidate
	ErrorPoolStart
	ErrorPoolStop
	ErrorPoolRestart
	ErrorPoolMonitor
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config []libhtp.Config

func (Config) Pool

func (p Config) Pool(ctx libctx.FuncContext, hdl srvtps.FuncHandler, defLog liblog.FuncLog) (Pool, liberr.Error)

func (Config) SetContext

func (p Config) SetContext(f libctx.FuncContext)

func (Config) SetDefaultTLS

func (p Config) SetDefaultTLS(f libtls.FctTLSDefault)

func (Config) SetHandlerFunc

func (p Config) SetHandlerFunc(hdl srvtps.FuncHandler)

func (Config) Validate

func (p Config) Validate() liberr.Error

func (Config) Walk

func (p Config) Walk(fct FuncWalkConfig)

type Filter

type Filter interface {
	Has(bindAddress string) bool
	Len() int
	List(fieldFilter, fieldReturn srvtps.FieldType, pattern, regex string) []string
	Filter(field srvtps.FieldType, pattern, regex string) Pool
}

type FuncWalk

type FuncWalk func(bindAddress string, srv libhtp.Server) bool

type FuncWalkConfig

type FuncWalkConfig func(cfg libhtp.Config) bool

type Manage

type Manage interface {
	Walk(fct FuncWalk) bool
	WalkLimit(fct FuncWalk, onlyBindAddress ...string) bool

	Clean()
	Load(bindAddress string) libhtp.Server
	Store(srv libhtp.Server)
	Delete(bindAddress string)

	StoreNew(cfg libhtp.Config, defLog liblog.FuncLog) error
	LoadAndDelete(bindAddress string) (val libhtp.Server, loaded bool)

	MonitorNames() []string
}

type Pool

type Pool interface {
	libsrv.Server

	Manage
	Filter

	Clone(ctx context.Context) Pool
	Merge(p Pool, def liblog.FuncLog) error
	Handler(fct srvtps.FuncHandler)
	Monitor(vrs libver.Version) ([]montps.Monitor, liberr.Error)
}

func New

func New(ctx libctx.FuncContext, hdl srvtps.FuncHandler, srv ...libhtp.Server) Pool

Jump to

Keyboard shortcuts

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