Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientContext ¶
type ClientContext struct {
IP string `json:"ip"`
}
type Dispatcher ¶
type EndPoint ¶
type EndPoint struct { IP string `json:"ip"` Port string `json:"port"` ActiveScore float64 `json:"-"` StaticScore float64 `json:"-"` Stats *Stat `json:"-"` // contains filtered or unexported fields }
func Dispatch ¶
func Dispatch(ctx *IpConfigContext) []*EndPoint
func NewEndPoint ¶
func (*EndPoint) CalculateScore ¶
func (ed *EndPoint) CalculateScore(ctx *IpConfigContext)
func (*EndPoint) UpdateStat ¶
type IpConfigContext ¶
type IpConfigContext struct { Ctx *context.Context AppCtx *app.RequestContext ClientCtx *ClientContext }
func BuildIpConfigContext ¶
func BuildIpConfigContext(c *context.Context, ctx *app.RequestContext) *IpConfigContext
Click to show internal directories.
Click to hide internal directories.