gnetwire

package
v0.0.0-...-060dca9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ProtocolVersion byte = 1
View Source
const SniffHeader = "shardSTORE"

Variables

View Source
var ENoResponse = fmt.Errorf("NoResponse")

Functions

func NewClient

func NewClient(netw, addr string) *fastrpc.Client

func NewClientWithDial

func NewClientWithDial(addr string, dial func(addr string) (net.Conn, error)) *fastrpc.Client

func NewServer

func NewServer(MS MultiStorage) *fastrpc.Server

Types

type Client

type Client struct {
	Cli    *fastrpc.Client
	K1, K2 string
}

func (Client) StoreReadMessage

func (c Client) StoreReadMessage(id []byte, over, head, body bool) (bufferex.Binary, error)

func (Client) StoreWriteMessage

func (c Client) StoreWriteMessage(id, msg []byte, expire uint64) error

func (Client) String

func (c Client) String() string

type MultiStorage

type MultiStorage interface {
	Lookup(K1, K2 []byte) articlestore.Storage
}

Jump to

Keyboard shortcuts

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