types

package
v0.0.0-...-9f8e559 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2016 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnexepectedEOF = errors.New("unexpected EOF")
)

Functions

func WriteMessage

func WriteMessage(w io.Writer, m Message) error

Types

type IncrementMessage

type IncrementMessage struct {
	Key uint64
	Val float64
	TTE uint32
}

func (IncrementMessage) Type

func (m IncrementMessage) Type() MessageType

type Message

type Message interface {
	Type() MessageType
}

func ReadMessage

func ReadMessage(r io.Reader) (Message, error)

type MessageType

type MessageType uint8
const (
	ZeroType MessageType = iota
	IncrementType
	SubscribeType
	UnsubscribeType
	NotifyType
	QueryType
)

func (MessageType) String

func (m MessageType) String() string

type NotifyMessage

type NotifyMessage struct {
	Key uint64
	Val float64
}

func (NotifyMessage) Type

func (m NotifyMessage) Type() MessageType

type QueryMessage

type QueryMessage struct {
	Key uint64
}

func (QueryMessage) Type

func (m QueryMessage) Type() MessageType

type SubscribeMessage

type SubscribeMessage struct {
	Key uint64
}

func (SubscribeMessage) Type

func (m SubscribeMessage) Type() MessageType

type UnsubscribeMessage

type UnsubscribeMessage struct {
	Key uint64
}

func (UnsubscribeMessage) Type

Jump to

Keyboard shortcuts

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