Documentation ¶
Index ¶
- Constants
- func GenRandomNumbers(begin int, end int, count int) []int
- type Endpoint
- func (e *Endpoint) Evict(name string, ip string, port int)
- func (e *Endpoint) Fetch(name string, n int, fa FetchAlgorithm) ([]Registry, error)
- func (e *Endpoint) Recv(transInfo TransInfo) error
- func (e *Endpoint) Register(name string, ip string, port int, weight int, extra map[string]interface{})
- func (e *Endpoint) RegistryDetail(name string) []Registry
- func (e *Endpoint) RegistryList() []string
- func (e *Endpoint) RegistrySummary() map[string]int
- func (e *Endpoint) Stop()
- type FetchAlgorithm
- type Item
- type ItemList
- type Registry
- type SyncInfo
- type TransInfo
Constants ¶
View Source
const ( StatusGreen = iota StatusBlue StatusYellow StatusOrange StatusRed )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func (*Endpoint) Register ¶
func (e *Endpoint) Register(name string, ip string, port int, weight int, extra map[string]interface{})
register action
func (*Endpoint) RegistryDetail ¶
registry detail
func (*Endpoint) RegistrySummary ¶
registry summary
type FetchAlgorithm ¶
type Registry ¶
type Registry struct { Name string `json:"name"` //server name Ip string `json:"ip"` //server ip Port int `json:"port"` //server port Status int `json:"status"` //server status CreateAt int64 `json:"create_at"` UpdateAt int64 `json:"update_at"` Weight int `json:"weight"` //server weight(负载权重,负载均衡使用) Extra map[string]interface{} `json:"extra"` //其他数据 }
Click to show internal directories.
Click to hide internal directories.