Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ExtensionName is the name used by Salesforce for its Bayeux extensions ExtensionName string = "replay" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extension ¶
type Extension struct {
// contains filtered or unexported fields
}
Extension represents the structure of the Salesforce Bayeux Message Extension and manages the state
func (*Extension) Registered ¶
func (e *Extension) Registered(extensionName string, client *bayeux.BayeuxClient)
Registered is called after an extension has been successfully registered
func (*Extension) Unregistered ¶
func (e *Extension) Unregistered()
Unregistered is called when an extension is unregistered
type IDStore ¶
type IDStore interface { Set(channel string, replayID int) Get(channel string) (int, bool) Delete(channel string) AsMap() map[string]int }
IDStore stores and manages the channels and replay IDs for a bayeux server that supports the replay extension
type MapStorage ¶
type MapStorage struct {
// contains filtered or unexported fields
}
MapStorage implements the IDStore interface over a regular map with a RWMutex protecting the access
func NewMapStorage ¶
func NewMapStorage() *MapStorage
NewMapStorage creates a new MapStorage instance
func (*MapStorage) AsMap ¶
func (s *MapStorage) AsMap() map[string]int
AsMap implements the IDStore interface
func (*MapStorage) Delete ¶
func (s *MapStorage) Delete(channel string)
Delete implements the IDStore interface
func (*MapStorage) Get ¶
func (s *MapStorage) Get(channel string) (replayID int, ok bool)
Get implements the IDStore interface
func (*MapStorage) Set ¶
func (s *MapStorage) Set(channel string, replayID int)
Set implements the IDStore interface
Click to show internal directories.
Click to hide internal directories.