algorithm

package
v0.0.0-...-0662ccb Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsistentError

func ConsistentError(text string) error

定义错误类型

Types

type Circle

type Circle []uint32

定义环类型

func (Circle) Len

func (c Circle) Len() int

func (Circle) Less

func (c Circle) Less(i, j int) bool

func (Circle) Swap

func (c Circle) Swap(i, j int)

type Consistent

type Consistent struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewConsisten

func NewConsisten(nodecount int) *Consistent

func (*Consistent) Add

func (c *Consistent) Add(elt string)

func (*Consistent) ForceSet

func (c *Consistent) ForceSet(keys ...string)

func (*Consistent) Get

func (c *Consistent) Get(key string) string

func (*Consistent) Members

func (c *Consistent) Members() []string

func (*Consistent) Remove

func (c *Consistent) Remove(elt string)

type Hash

type Hash func(date []byte) uint32

Jump to

Keyboard shortcuts

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