porthndlr

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.2.2

type Config struct {
	Accept           ippool.Pool
	Deny             ippool.Pool
	Servers          ippool.ServerPool
	Filter           ippool.Filter
	Toport           string
	ServersWeight    int
	ServersMaxFails  int
	ServersBreakTime int
}

func NewConfig added in v0.2.2

func NewConfig(hconf map[string]interface{}, db *ipdb.IPDB, port, handlerLogDir string) (*Config, error)

type Handler added in v0.2.2

type Handler struct {
	Port           string
	Protocol       string
	Config         *Config
	ConnNumber     uint64
	DeniedConnNumb uint64
	Run            bool
	// contains filtered or unexported fields
}

the struct that keep info about "microprogramm" that listen the port

func NewHandler added in v0.2.2

func NewHandler(protocol, port string, db *ipdb.IPDB, hconf map[string]interface{}, logDir string) (*Handler, error)

the struct that keep info about "microprogramm" that listen the port

func (*Handler) Handle added in v0.2.2

func (h *Handler) Handle()

func (*Handler) SaveState added in v0.2.5

func (h *Handler) SaveState() error

func (*Handler) Stop added in v0.2.5

func (h *Handler) Stop()

func (*Handler) UpdateConfig added in v0.2.2

func (h *Handler) UpdateConfig(c *Config)

Jump to

Keyboard shortcuts

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