router

package
v0.0.0-...-9048091 Latest Latest
Warning

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

Go to latest
Published: May 8, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureShard

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

func NewFeatureShard

func NewFeatureShard(nodes []string, replicaNum int) *FeatureShard

func (*FeatureShard) GetNodesByFeature

func (this *FeatureShard) GetNodesByFeature(key []int64) (nodes []string, err error)

func (*FeatureShard) SetNodes

func (this *FeatureShard) SetNodes(nodes []string, replicaNum int) *FeatureShard

type Rpc

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

func NewRpc

func NewRpc() *Rpc

func (*Rpc) GetNodesByFeature

func (this *Rpc) GetNodesByFeature(key []int64) (r []string, ex *rpc.RouterException, err error)

func (*Rpc) SetNodes

func (this *Rpc) SetNodes(nodes []string) (ex *rpc.RouterException, err error)

func (*Rpc) Start

func (this *Rpc) Start(host string, port int) (err error)

func (*Rpc) Stop

func (this *Rpc) Stop() (err error)

func (*Rpc) Wait

func (this *Rpc) Wait()

Directories

Path Synopsis
rpc

Jump to

Keyboard shortcuts

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