Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultGeeRegistry = NewGeeRegistry(defaultAlive)
Functions ¶
Types ¶
type GeeRegistry ¶
type GeeRegistry struct {
// contains filtered or unexported fields
}
GeeRegistry is a simple register center, provide following functions. add a server and receive heartbeat to keep it alive. returns all alive servers and delete dead servers sync simultaneously.
func NewGeeRegistry ¶
func NewGeeRegistry(timeout time.Duration) *GeeRegistry
func (*GeeRegistry) HandleHTTP ¶
func (r *GeeRegistry) HandleHTTP(registryPath string)
func (*GeeRegistry) ServeHTTP ¶
func (r *GeeRegistry) ServeHTTP(w http.ResponseWriter, req *http.Request)
run at /geerpc/registry all info is in httpHead
type ServerItem ¶
type ServerItem struct { Addr string // contains filtered or unexported fields }
means a server
Click to show internal directories.
Click to hide internal directories.