common

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2016 License: MIT Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndexSize uint64 = 33
View Source
var MessageHeaderSize = 12

Functions

func FaceIt

func FaceIt(err error)

Types

type ConnectionStruct

type ConnectionStruct struct {
	Connection net.Conn
	Topic      uint64
	Id         uint64
	Channel    MessageChannel
}

type ConnectionsMap

type ConnectionsMap map[uint64]ConnectionStruct

type IndexRecord

type IndexRecord struct {
	Position   uint64
	Offset     uint64
	Length     uint64
	Topic      uint64
	Connection uint64
	Ack        byte
}

func (*IndexRecord) Deserialize

func (self *IndexRecord) Deserialize(reader io.Reader) bool

func (IndexRecord) Serialize

func (self IndexRecord) Serialize() []byte

type MessageChannel

type MessageChannel chan MessageStruct

type MessageChannels

type MessageChannels []MessageChannel

type MessageStruct

type MessageStruct struct {
	AckChannel chan bool
	Payload    []byte
	Topic      uint64
	Length     uint32
	Position   uint64
}

func (*MessageStruct) Deserialize

func (self *MessageStruct) Deserialize(reader io.Reader) bool

func (*MessageStruct) Load

func (self *MessageStruct) Load(file *os.File, record IndexRecord)

func (*MessageStruct) Serialize

func (self *MessageStruct) Serialize() []byte

type TopicsMap

type TopicsMap map[uint64]([]uint64)

Jump to

Keyboard shortcuts

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