message

package
v0.1.0-alpha.0...-0b1224c Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Messages   []*fsm.Message
	LastSeqNum uint64
}

Message stores the messages sent by an agent per channel.

func (*Message) Add

func (m *Message) Add(msg *fsm.Message, num *uint64)

Add appends the latest sent message to the Message object, updating the latest sequence number

func (*Message) From

func (m *Message) From(a, b uint64) []*fsm.Message

From returns all message sent from sequence number a, inclusive up until sequence number b, exclusive.

func (*Message) MarshalJSON

func (m *Message) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler. Required for genbolt.

func (*Message) UnmarshalJSON

func (m *Message) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler. Required for genbolt.

Jump to

Keyboard shortcuts

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