xt_common

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 (self *CostVisitor) CreditOverTime(credit uint8, period time.Duration) *time.Ticker

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

type TerminatorCosts struct {
	CircuitCount uint32
	FailureCost  uint32
	CachedCost   uint32
}

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

Jump to

Keyboard shortcuts

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