route

package
v0.0.0-...-2aa8555 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidIterator  = errors.New("invalid iterator")
	ErrUnexpectedDelete = errors.New("unexpected delete")
)

Functions

func BytesToUint64

func BytesToUint64(buf []byte) uint64

BytesToUint64 the type of bytes change the type of uint64

func NewRdsRoute

func NewRdsRoute(rdc util.Redic) *rdsRoute

func NewTiRoute

func NewTiRoute(txn kv.Transaction) *tiRoute

func Uint64ToBytes

func Uint64ToBytes(i uint64) []byte

Uint64ToBytes the type of uint64 change the type of bytes

Types

type Option

type Option func(r *routeOps)

func SetRedisStore

func SetRedisStore(rdc util.Redic) Option

func SetTikvStore

func SetTikvStore(txn kv.Transaction) Option

type RouteOps

type RouteOps interface {
	Add(ns, topic, address string, version uint64) error
	Remove(ns, topic, address string, version uint64) error
	Exist(ns, topic string) (bool, error)
	Lookup(ns, topic string) ([]string, error)
}

func NewRouteOps

func NewRouteOps(opts ...Option) RouteOps

Jump to

Keyboard shortcuts

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