tools

package
v0.0.0-...-c2c101f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interval

type Interval struct {
	Low  uint64
	High uint64
}

type IntervalTree

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

func NewIntervalTree

func NewIntervalTree(ctx context.Context) *IntervalTree

func (*IntervalTree) BatchDelete

func (t *IntervalTree) BatchDelete(ctx context.Context, intervalList []*Interval) error

func (*IntervalTree) BatchInsert

func (t *IntervalTree) BatchInsert(ctx context.Context, kvmap map[*Interval]interface{}) error

func (*IntervalTree) Empty

func (t *IntervalTree) Empty() bool

func (*IntervalTree) ListNode

func (t *IntervalTree) ListNode() (ch chan *KV)

func (*IntervalTree) Search

func (t *IntervalTree) Search(ctx context.Context, i *Interval) (*Interval, interface{}, error)

func (*IntervalTree) UpdateNode

func (t *IntervalTree) UpdateNode(ctx context.Context, i *Interval, value interface{}) error

type KV

type KV struct {
	Interval *Interval
	Value    interface{}
}

type LeaderMgr

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

func NewLeaderMgr

func NewLeaderMgr(instanceId string, endpoints []string) (lm *LeaderMgr, err error)

func (*LeaderMgr) Elect

func (lm *LeaderMgr) Elect(key string) (err error)

func (*LeaderMgr) Get

func (lm *LeaderMgr) Get(ctx context.Context, key string) (val string, err error)

func (*LeaderMgr) Set

func (lm *LeaderMgr) Set(ctx context.Context, key string, val string) (err error)

func (*LeaderMgr) Stop

func (lm *LeaderMgr) Stop()

type RBcolor

type RBcolor int

Jump to

Keyboard shortcuts

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