Documentation
¶
Overview ¶
Package store is QuickFIX/Go's in-memory message store with a lock around it, so the sequence numbers can be read while the session runs.
The engine's own memory store is used as is; this only serializes access to it. A session goroutine owns the store and the lab reads NextSender / NextTarget from elsewhere to show them, which unlocked would be a data race. Nothing is written to disk.
Index ¶
- type Factory
- type Locked
- func (l *Locked) Close() error
- func (l *Locked) CreationTime() time.Time
- func (l *Locked) GetMessages(begin, end int) ([][]byte, error)
- func (l *Locked) IncrNextSenderMsgSeqNum() error
- func (l *Locked) IncrNextTargetMsgSeqNum() error
- func (l *Locked) IterateMessages(begin, end int, cb func([]byte) error) error
- func (l *Locked) NextSenderMsgSeqNum() int
- func (l *Locked) NextTargetMsgSeqNum() int
- func (l *Locked) Refresh() error
- func (l *Locked) Reset() error
- func (l *Locked) SaveMessage(seq int, msg []byte) error
- func (l *Locked) SaveMessageAndIncrNextSenderMsgSeqNum(seq int, msg []byte) error
- func (l *Locked) SetCreationTime(t time.Time)
- func (l *Locked) SetNextSenderMsgSeqNum(n int) error
- func (l *Locked) SetNextTargetMsgSeqNum(n int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory creates one locked memory store per session and remembers it so its sequence numbers can be read by session ID.
type Locked ¶
type Locked struct {
// contains filtered or unexported fields
}
Locked is a MessageStore with every method under one mutex.
func (*Locked) CreationTime ¶
func (*Locked) IncrNextSenderMsgSeqNum ¶
func (*Locked) IncrNextTargetMsgSeqNum ¶
func (*Locked) IterateMessages ¶
IterateMessages copies the range under the lock and calls cb outside it, so a callback that sends (a resend does) cannot deadlock on this store.