Documentation ¶
Index ¶
- Constants
- func RegisterNewDimension(newDimension NewDimension)
- type DefaultRegulator
- type DefaultWorkPool
- type InvocationDimension
- type InvocationStat
- func (s *InvocationStat) AddUselessCycle() bool
- func (s *InvocationStat) Call(isException bool)
- func (s *InvocationStat) Downgrade()
- func (s *InvocationStat) GetCall() uint64
- func (s *InvocationStat) GetCount() (uint64, uint64)
- func (s *InvocationStat) GetDowngradeTime() int64
- func (s *InvocationStat) GetExceptionRate() (bool, float64)
- func (s *InvocationStat) GetInvocationKey() string
- func (s *InvocationStat) GetMeasureKey() string
- func (s *InvocationStat) IsHealthy() bool
- func (s *InvocationStat) Recover()
- func (s *InvocationStat) RestUselessCycle()
- func (s *InvocationStat) Snapshot() *InvocationStat
- func (s *InvocationStat) String() string
- func (s *InvocationStat) Update(snapshot *InvocationStat)
- type InvocationStatFactory
- type MeasureModel
- type NewDimension
- type Regulator
- type WorkGoroutine
- type WorkPool
Constants ¶
View Source
const MAX_NO_INVOKE_CYCLE = 6
Variables ¶
This section is empty.
Functions ¶
func RegisterNewDimension ¶
func RegisterNewDimension(newDimension NewDimension)
Types ¶
type DefaultRegulator ¶
type DefaultRegulator struct {
// contains filtered or unexported fields
}
func NewDefaultRegulator ¶
func NewDefaultRegulator(config *v2.FaultToleranceFilterConfig) *DefaultRegulator
func (*DefaultRegulator) Regulate ¶
func (r *DefaultRegulator) Regulate(stat *InvocationStat)
type DefaultWorkPool ¶
type DefaultWorkPool struct {
// contains filtered or unexported fields
}
func NewDefaultWorkPool ¶
func NewDefaultWorkPool(size int64) *DefaultWorkPool
func (*DefaultWorkPool) Schedule ¶
func (w *DefaultWorkPool) Schedule(model *MeasureModel)
type InvocationDimension ¶
type InvocationStat ¶
type InvocationStat struct {
// contains filtered or unexported fields
}
func NewInvocationStat ¶
func NewInvocationStat(host api.HostInfo, dimension InvocationDimension) *InvocationStat
func (*InvocationStat) AddUselessCycle ¶
func (s *InvocationStat) AddUselessCycle() bool
func (*InvocationStat) Call ¶
func (s *InvocationStat) Call(isException bool)
func (*InvocationStat) Downgrade ¶
func (s *InvocationStat) Downgrade()
func (*InvocationStat) GetCall ¶
func (s *InvocationStat) GetCall() uint64
func (*InvocationStat) GetCount ¶
func (s *InvocationStat) GetCount() (uint64, uint64)
func (*InvocationStat) GetDowngradeTime ¶
func (s *InvocationStat) GetDowngradeTime() int64
func (*InvocationStat) GetExceptionRate ¶
func (s *InvocationStat) GetExceptionRate() (bool, float64)
func (*InvocationStat) GetInvocationKey ¶
func (s *InvocationStat) GetInvocationKey() string
func (*InvocationStat) GetMeasureKey ¶
func (s *InvocationStat) GetMeasureKey() string
func (*InvocationStat) IsHealthy ¶
func (s *InvocationStat) IsHealthy() bool
func (*InvocationStat) Recover ¶
func (s *InvocationStat) Recover()
func (*InvocationStat) RestUselessCycle ¶
func (s *InvocationStat) RestUselessCycle()
func (*InvocationStat) Snapshot ¶
func (s *InvocationStat) Snapshot() *InvocationStat
func (*InvocationStat) String ¶
func (s *InvocationStat) String() string
func (*InvocationStat) Update ¶
func (s *InvocationStat) Update(snapshot *InvocationStat)
type InvocationStatFactory ¶
type InvocationStatFactory struct {
// contains filtered or unexported fields
}
func GetInvocationStatFactoryInstance ¶
func GetInvocationStatFactoryInstance() *InvocationStatFactory
func NewInvocationStatFactory ¶
func NewInvocationStatFactory(config *v2.FaultToleranceFilterConfig) *InvocationStatFactory
func (*InvocationStatFactory) GetInvocationStat ¶
func (f *InvocationStatFactory) GetInvocationStat(host api.HostInfo, dimension InvocationDimension) *InvocationStat
func (*InvocationStatFactory) ReleaseInvocationStat ¶
func (f *InvocationStatFactory) ReleaseInvocationStat(key string)
type MeasureModel ¶
type MeasureModel struct {
// contains filtered or unexported fields
}
func NewMeasureModel ¶
func NewMeasureModel(key string, config *v2.FaultToleranceFilterConfig) *MeasureModel
func (*MeasureModel) AddInvocationStat ¶
func (m *MeasureModel) AddInvocationStat(stat *InvocationStat)
func (*MeasureModel) GetKey ¶
func (m *MeasureModel) GetKey() string
func (*MeasureModel) IsArrivalTime ¶
func (m *MeasureModel) IsArrivalTime() bool
func (*MeasureModel) Measure ¶
func (m *MeasureModel) Measure()
func (*MeasureModel) String ¶
func (m *MeasureModel) String() string
type NewDimension ¶
type NewDimension func(info api.RequestInfo) InvocationDimension
func GetNewDimensionFunc ¶
func GetNewDimensionFunc() NewDimension
type Regulator ¶
type Regulator interface {
Regulate(stat *InvocationStat)
}
type WorkGoroutine ¶
type WorkGoroutine struct {
// contains filtered or unexported fields
}
func NewWorkGoroutine ¶
func NewWorkGoroutine() *WorkGoroutine
func (*WorkGoroutine) AddTask ¶
func (g *WorkGoroutine) AddTask(key string, model *MeasureModel)
func (*WorkGoroutine) Start ¶
func (g *WorkGoroutine) Start()
type WorkPool ¶
type WorkPool interface {
Schedule(model *MeasureModel)
}
Click to show internal directories.
Click to hide internal directories.