Documentation ¶
Index ¶
- Constants
- func CheckIsBlackKey(key string) bool
- func CheckIsWhiteKey(key string) bool
- func FillPconfigs(pconfigs []*models.Pconfig) error
- func FillSlots(slots []*models.Slot) error
- func Pconfigs() []*models.Pconfig
- func SetProxyInfo(stats *Stats)
- func ShortSlots() []*models.Slot
- type GlobalOpsCost
- type OpsCost
- type Overview
- type Proxy
- func (p *Proxy) AdminAddress() string
- func (p *Proxy) Close() error
- func (p *Proxy) Config() *config.Config
- func (p *Proxy) IsClosed() bool
- func (p *Proxy) IsOnline() bool
- func (p *Proxy) Model() *models.Proxy
- func (p *Proxy) ProxyAddress() string
- func (p *Proxy) Start() error
- func (p *Proxy) XAuth() string
- type RuntimeStats
- type Stats
- type StatsFlags
Constants ¶
View Source
const ( StatsCmds = StatsFlags(1 << iota) StatsSlots StatsRuntime StatsFull = StatsFlags(^uint32(0)) )
Variables ¶
This section is empty.
Functions ¶
func CheckIsBlackKey ¶
func CheckIsWhiteKey ¶
func FillPconfigs ¶
func SetProxyInfo ¶
func SetProxyInfo(stats *Stats)
func ShortSlots ¶
Types ¶
type GlobalOpsCost ¶
type GlobalOpsCost struct { AvgCost atomic.Int64 `json:"avg_cost"` KVCost atomic.Int64 `json:"kv_cost"` ListCost atomic.Int64 `json:"list_cost"` HashCost atomic.Int64 `json:"hash_cost"` SetCost atomic.Int64 `json:"set_cost"` ZsetCost atomic.Int64 `json:"zset_cost"` WriteCost atomic.Int64 `json:"write_cost"` ReadCost atomic.Int64 `json:"read_cost"` }
type Overview ¶
type Overview struct { Version string `json:"version"` Compile string `json:"compile"` Config *config.Config `json:"config,omitempty"` Model *models.Proxy `json:"model,omitempty"` Stats *Stats `json:"stats,omitempty"` Slots []*models.Slot `json:"slots,omitempty"` }
func GetOverview ¶
func GetOverview(s *Proxy, flags StatsFlags) *Overview
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) AdminAddress ¶
func (*Proxy) ProxyAddress ¶
type RuntimeStats ¶
type RuntimeStats struct { General struct { Alloc uint64 `json:"alloc"` Sys uint64 `json:"sys"` Lookups uint64 `json:"lookups"` Mallocs uint64 `json:"mallocs"` Frees uint64 `json:"frees"` } `json:"general"` Heap struct { Alloc uint64 `json:"alloc"` Sys uint64 `json:"sys"` Idle uint64 `json:"idle"` Inuse uint64 `json:"inuse"` Objects uint64 `json:"objects"` } `json:"heap"` GC struct { Num uint32 `json:"num"` CPUFraction float64 `json:"cpu_fraction"` TotalPauseMs uint64 `json:"total_pausems"` } `json:"gc"` NumProcs int `json:"num_procs"` NumGoroutines int `json:"num_goroutines"` NumCgoCall int64 `json:"num_cgo_call"` }
type Stats ¶
type Stats struct { Online bool `json:"online"` Closed bool `json:"closed"` ReadCrossCloud bool `json:"read_cross_cloud"` PoolActive int `json:"pool_active"` CmdOps struct { Total int64 `json:"total"` Fails int64 `json:"fails"` PeriodFails int64 `json:"periodfails"` QPS int64 `json:"qps"` Cmd []*dostats.CalOpStats `json:"cmd,omitempty"` OpsCost } `json:"cdm_ops"` Pool dostats.PoolStat `json:"pool"` Sessions struct { Total int64 `json:"total"` Alive int64 `json:"alive"` } `json:"sessions"` Rusage struct { Now string `json:"now"` CPU float64 `json:"cpu"` Mem int64 `json:"mem"` Raw *utils.Usage `json:"raw,omitempty"` } `json:"rusage"` Runtime *RuntimeStats `json:"runtime,omitempty"` // contains filtered or unexported fields }
func GetSimpleStats ¶
func GetSimpleStats() *Stats
type StatsFlags ¶
type StatsFlags uint32
func (StatsFlags) HasBit ¶
func (s StatsFlags) HasBit(m StatsFlags) bool
Click to show internal directories.
Click to hide internal directories.