ring

package
v0.5.0-beta5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeRangeUpdate

type NodeRangeUpdate struct {
	NodeID      string
	ExpectRange cluster.KeySet
}

type Ring

type Ring struct {
	// contains filtered or unexported fields
}

func NewRing

func NewRing(nodes []RingNode) *Ring

func (*Ring) MapNode

func (r *Ring) MapNode(key int64) *RingNode

func (*Ring) RangeSize

func (r *Ring) RangeSize() int64

func (*Ring) Seq

func (r *Ring) Seq() int64

func (*Ring) WithEvent

func (r *Ring) WithEvent(event cluster.RingEvent) *Ring

type RingNode

type RingNode struct {
	NodeID string
	RingPosition
}

func (RingNode) Start

func (e RingNode) Start() int64

type RingPosition

type RingPosition int64

func (RingPosition) ExtractKey

func (e RingPosition) ExtractKey() float64

func (RingPosition) IsRemoved

func (e RingPosition) IsRemoved() bool

func (RingPosition) String

func (e RingPosition) String() string

type Transference

type Transference struct {
	Seq       int64
	StartTime time.Time
	Update    NodeRangeUpdate
}

Jump to

Keyboard shortcuts

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