Documentation ¶
Index ¶
- type CostVisitor
- func (self *CostVisitor) CreditAll(credit uint8)
- func (self *CostVisitor) CreditOverTime(credit uint8, period time.Duration) *time.Ticker
- func (self *CostVisitor) GetCircuitCount(terminatorId string) uint32
- func (self *CostVisitor) GetCost(terminatorId string) uint32
- func (self *CostVisitor) GetFailureCost(terminatorId string) uint32
- func (self *CostVisitor) HandleTerminatorChange(event xt.StrategyChangeEvent) error
- func (self *CostVisitor) NotifyEvent(event xt.TerminatorEvent)
- func (self *CostVisitor) VisitCircuitRemoved(event xt.TerminatorEvent)
- func (self *CostVisitor) VisitDialFailed(event xt.TerminatorEvent)
- func (self *CostVisitor) VisitDialSucceeded(event xt.TerminatorEvent)
- type TerminatorCosts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostVisitor ¶
type CostVisitor struct { Costs cmap.ConcurrentMap[string, *TerminatorCosts] CircuitCost uint32 FailureCost uint32 SuccessCredit uint32 }
func NewCostVisitor ¶ added in v1.1.12
func NewCostVisitor(circuitCost, failureCost, successCredit uint16) *CostVisitor
func (*CostVisitor) CreditAll ¶ added in v1.1.12
func (self *CostVisitor) CreditAll(credit uint8)
func (*CostVisitor) CreditOverTime ¶ added in v1.1.12
func (*CostVisitor) GetCircuitCount ¶ added in v1.1.12
func (self *CostVisitor) GetCircuitCount(terminatorId string) uint32
func (*CostVisitor) GetCost ¶ added in v1.1.12
func (self *CostVisitor) GetCost(terminatorId string) uint32
func (*CostVisitor) GetFailureCost ¶ added in v1.1.12
func (self *CostVisitor) GetFailureCost(terminatorId string) uint32
func (*CostVisitor) HandleTerminatorChange ¶ added in v1.1.12
func (self *CostVisitor) HandleTerminatorChange(event xt.StrategyChangeEvent) error
func (*CostVisitor) NotifyEvent ¶ added in v1.1.12
func (self *CostVisitor) NotifyEvent(event xt.TerminatorEvent)
func (*CostVisitor) VisitCircuitRemoved ¶
func (self *CostVisitor) VisitCircuitRemoved(event xt.TerminatorEvent)
func (*CostVisitor) VisitDialFailed ¶
func (self *CostVisitor) VisitDialFailed(event xt.TerminatorEvent)
func (*CostVisitor) VisitDialSucceeded ¶
func (self *CostVisitor) VisitDialSucceeded(event xt.TerminatorEvent)
type TerminatorCosts ¶ added in v1.1.12
func (*TerminatorCosts) Get ¶ added in v1.1.12
func (self *TerminatorCosts) Get() uint16
func (*TerminatorCosts) Inspect ¶ added in v1.1.12
func (self *TerminatorCosts) Inspect(terminatorId string) *inspect.TerminatorCostDetail
Click to show internal directories.
Click to hide internal directories.