discovery

package
v0.0.0-...-beee1d2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdArgsDiscovery

func NewCmdArgsDiscovery(addr, password, alias string) (*cmdArgsDiscovery, error)

func NewCodisDiscovery

func NewCodisDiscovery(url, password, alias string) (*codisDiscovery, error)

func NewFileDiscovery

func NewFileDiscovery(fileName string) (*fileDiscovery, error)

Types

type CmdInfo

type CmdInfo struct {
	Opstr         string `json:"opstr"`
	Calls         int64  `json:"calls"`
	Usecs_percall int64  `json:"usecs_percall"`
	Fails         int64  `json:"fails"`
	MaxDelay      int64  `json:"max_delay"`
}

type CodisGroupInfo

type CodisGroupInfo struct {
	Models []CodisModelInfo `json:"models"`
}

type CodisModelInfo

type CodisModelInfo struct {
	Id      int               `json:"id"`
	Servers []CodisServerInfo `json:"servers"`
}

type CodisProxyInfo

type CodisProxyInfo struct {
	Models []CodisProxyModelInfo `json:"models"`
}

type CodisProxyModelInfo

type CodisProxyModelInfo struct {
	Id          int    `json:"id"`
	AdminAddr   string `json:"admin_addr"`
	ProductName string `json:"product_name"`
	DataCenter  string `json:"data_center"`
}

type CodisServerAction

type CodisServerAction struct {
	Action string `json:"action"`
}

type CodisServerInfo

type CodisServerInfo struct {
	Server             string            `json:"server"`
	Datacenter         string            `json:"datacenter"`
	ServerAction       CodisServerAction `json:"action"`
	ServerReplicaGroup bool              `json:"replica_group"`
}

type CodisStatsInfo

type CodisStatsInfo struct {
	Group CodisGroupInfo `json:"group"`
	Proxy CodisProxyInfo `json:"proxy"`
}

type CodisTopomInfo

type CodisTopomInfo struct {
	Stats CodisStatsInfo `json:"stats"`
}

type Discovery

type Discovery interface {
	GetInstances() []Instance
	GetInstancesProxy() []InstanceProxy
	CheckUpdate(chan int, string)
}

type GeneralInfo

type GeneralInfo struct {
	Alloc   int64 `json:"alloc"`
	Sys     int64 `json:"sys"`
	Lookups int64 `json:"lookups"`
	Mallocs int64 `json:"mallocs"`
	Frees   int64 `json:"frees"`
}

type HeapInfo

type HeapInfo struct {
	Alloc   int64 `json:"alloc"`
	Sys     int64 `json:"sys"`
	Idle    int64 `json:"idle"`
	Inuse   int64 `json:"inuse"`
	Objects int64 `json:"objects"`
}

type Instance

type Instance struct {
	Addr     string
	Password string
	Alias    string
}

type InstanceProxy

type InstanceProxy struct {
	ID          int
	Addr        string
	ProductName string
}

type ProxyOpsInfo

type ProxyOpsInfo struct {
	Total int       `json:"total"`
	Fails int       `json:"fails"`
	Redis RedisInfo `json:"redis"`
	Qps   int       `json:"qps"`
	Cmd   []CmdInfo `json:"cmd"`
}

type ProxyStats

type ProxyStats struct {
	Online       bool         `json:"online"`
	Ops          ProxyOpsInfo `json:"ops"`
	Rusage       RusageInfo   `json:"rusage"`
	RunTime      RunTimeInfo  `json:"runtime"`
	SlowCmdCount int64        `json:"slow_cmd_count"`
}

type RedisInfo

type RedisInfo struct {
	Errors int `json:"errors"`
}

type RowInfo

type RowInfo struct {
	Utime  int64 `json:"utime"`
	Stime  int64 `json:"stime"`
	MaxRss int64 `json:"max_rss"`
	IxRss  int64 `json:"ix_rss"`
	IdRss  int64 `json:"id_rss"`
	IsRss  int64 `json:"is_rss"`
}

type RunTimeInfo

type RunTimeInfo struct {
	General GeneralInfo `json:"general"`
	Heap    HeapInfo    `json:"heap"`
}

type RusageInfo

type RusageInfo struct {
	Now string  `json:"now"`
	Cpu float64 `json:"cpu"`
	Mem float64 `json:"mem"`
	Raw RowInfo `json:"raw"`
}

Jump to

Keyboard shortcuts

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