mock

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DsRpcServer

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

func NewDsRpcServer

func NewDsRpcServer(addr string) *DsRpcServer

func (*DsRpcServer) Start

func (svr *DsRpcServer) Start()

func (*DsRpcServer) Stop

func (svr *DsRpcServer) Stop()

type DsServer

type DsServer struct {
	*metapb.Node
	// contains filtered or unexported fields
}

func NewDsServer

func NewDsServer(port uint32, msAddrs []string) *DsServer

func (*DsServer) GetRangeManager

func (ds *DsServer) GetRangeManager() *RangeManager

func (*DsServer) Heartbeat

func (ds *DsServer) Heartbeat()

func (*DsServer) Start

func (ds *DsServer) Start()

func (*DsServer) Stop

func (ds *DsServer) Stop()

type Range

type Range struct {
	*metapb.Range
	// contains filtered or unexported fields
}

func NewRange

func NewRange(nodeId uint64, r *metapb.Range) *Range

func (*Range) IsLeader

func (r *Range) IsLeader() bool

type RangeManager

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

func NewRangeManager

func NewRangeManager() *RangeManager

func (*RangeManager) AddRange

func (rm *RangeManager) AddRange(r *Range)

func (*RangeManager) DelRange

func (rm *RangeManager) DelRange(rangeId uint64)

func (*RangeManager) FindRange

func (rm *RangeManager) FindRange(id uint64) *Range

func (*RangeManager) Walk

func (rm *RangeManager) Walk(f func(id uint64, r *Range))

type WorkFunc

type WorkFunc func(msg *dsClient.Message)

Jump to

Keyboard shortcuts

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