types

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashFunc

type HashFunc func([]byte) uint32

type IBalancer

type IBalancer interface {
	Serve() func(ctx *fasthttp.RequestCtx)
	Stats() []ProxyStat
}

type IsHostAlive

type IsHostAlive func(string) bool

type ProxyStat

type ProxyStat struct {
	Addr          string    `json:"addr"`
	TotalReqCount uint64    `json:"total_req_count"`
	AvgResTime    float64   `json:"avg_res_time"`
	LastUseTime   time.Time `json:"last_use_time"`
	ConnsCount    int       `json:"conns_count"`
	IsHostAlive   bool      `json:"is_host_alive"`
	BackendHash   uint32    `json:"backend_hash"`
}

Jump to

Keyboard shortcuts

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