package
Version:
v0.0.0-...-63f7e71
Opens a new window with list of versions in this module.
Published: Jun 6, 2019
License: LGPL-3.0
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
var (
ErrSessionExpired = errors.New("session expired")
ErrIllegalPathNodeCharacter = errors.New("illegal path node character")
ErrPathNodeEmpty = errors.New("path node empty")
ErrNoServiceFound = errors.New("no service found")
)
type Discovery interface {
Start() error
GracefulShutdown() error
AcquireSession() (int64, error)
SessionHeatbeat(session int64) error
PublishService(node *Node, service, version string, tags []string, session int64) error
PickOneFromTag(service, version, tag string) (*Node, error)
PickAllFromTag(service, version, tag string) ([]*Node, error)
}
type Node struct {
Weight int `json:"weight"`
Address []byte `json:"address"`
Port uint16 `json:"port"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.