Documentation ¶
Index ¶
- func AddOrUpdateHashRing(key string, c *consistent.Consistent)
- func DeleteHashRing(key string)
- func GetHashRing(key string) (*consistent.Consistent, bool)
- func NewServiceInstanceHashRing(instances []ServiceInstance) *consistent.Consistent
- func RangeHashRing(fn func(key, value interface{}) bool)
- func SplitKey(key string) (namespace, name, instanceName string, err error)
- type ServiceInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOrUpdateHashRing ¶
func AddOrUpdateHashRing(key string, c *consistent.Consistent)
AddOrUpdateHashRing adds or updates a hash ring in cache
func GetHashRing ¶
func GetHashRing(key string) (*consistent.Consistent, bool)
GetHashRing returns a hash ring from cache
func NewServiceInstanceHashRing ¶
func NewServiceInstanceHashRing(instances []ServiceInstance) *consistent.Consistent
func RangeHashRing ¶
func RangeHashRing(fn func(key, value interface{}) bool)
RangeHashRing ranges all hash rings
Types ¶
type ServiceInstance ¶
ServiceInstance is the implementation of the consistent.Member interface
func (ServiceInstance) String ¶
func (si ServiceInstance) String() string
String gets service instance key
Click to show internal directories.
Click to hide internal directories.