Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IndexSize uint64 = 33
View Source
var MessageHeaderSize = 12
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.