Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MessageOffset uint64
XXX(1.0): replace MessageOffset with 7804071725000000000 (2217-04-20 23:42:05) MessageOffset will be added to all robust.Message ids. We need an offset because message ids must be monotonically increasing, and RobustIRC used to use UNIX nano timestamps. For new networks, the offset doesn’t hurt, and it’s configurable in case networks need to transition back and forth between the old and the new mechanism. See also issue #150.
Functions ¶
func IdFromRaftIndex ¶
Types ¶
type Message ¶
type Message struct { Id Id Session Id Type Type Data string // UnixNano is set by the server which accepts the message. UnixNano int64 // InterestingFor is a map from session ids (only the Id part of a // robust.Id, since Reply is always unset for sessions) to a bool // that signals whether the session is interested in the message. // InterestingFor gets set once in SendMessages and stays // constant. InterestingFor map[uint64]bool `json:"-"` // List of all servers currently in the network. Only present when // Type == robust.Ping. Servers []string `json:",omitempty"` // Current master, as a hint for the proxy (may save one redirect). Currentmaster string `json:",omitempty"` // ClientMessageId sent by client. Only present when Type == // robust.IRCFromClient ClientMessageId uint64 `json:",omitempty"` // Revision is the config file revision. Only present when Type == // robust.Config Revision uint64 `json:",omitempty"` // RemoteAddr is the network address that sent the request. RemoteAddr string `json:",omitempty"` }
func NewMessageFromBytes ¶
func (*Message) CopyToProtoMessage ¶
func (m *Message) CopyToProtoMessage(dst *pb.RobustMessage)
CopyToProtoMessage writes the message to dst, assuming that dst is a fully allocated RobustMessage.
func (*Message) PrivacyFilter ¶
func (*Message) ProtoMessage ¶
func (m *Message) ProtoMessage() *pb.RobustMessage
func (*Message) TimestampString ¶
Click to show internal directories.
Click to hide internal directories.