msgstore

package
v1.0.0-preview Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2017 License: Apache-2.0 Imports: 2 Imported by: 818

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageStore

type MessageStore interface {
	// add adds a message to the store
	// returns true or false whether the message was added to the store
	Add(msg interface{}) bool

	// size returns the amount of messages in the store
	Size() int

	// get returns all messages in the store
	Get() []interface{}
}

MessageStore adds messages to an internal buffer. When a message is received, it might:

  • Be added to the buffer
  • Discarded because of some message already in the buffer (invalidated)
  • Make a message already in the buffer to be discarded (invalidates)

When a message is invalidated, the invalidationTrigger is invoked on that message.

func NewMessageStore

func NewMessageStore(pol common.MessageReplacingPolicy, trigger invalidationTrigger) MessageStore

Jump to

Keyboard shortcuts

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