Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AppTopicConnectionState represents the session state change topic AppTopicConnectionState = "State" // AppTopicConnectionStatistics represents the session stats topic AppTopicConnectionStatistics = "Statistics" // AppTopicConnectionSession represents the session lifetime changes AppTopicConnectionSession = "Session" )
Topic represents the different topics a consumer can subscribe to
View Source
const ( // NotConnected means no connection exists NotConnected = State("NotConnected") // Connecting means that connection is startCalled but not yet fully established Connecting = State("Connecting") // Connected means that fully established connection exists Connected = State("Connected") // Disconnecting means that connection close is in progress Disconnecting = State("Disconnecting") // Reconnecting means that connection is lost but underlying service is trying to reestablish it Reconnecting = State("Reconnecting") // Unknown means that we could not map the underlying transport state to our state Unknown = State("Unknown") // Canceled means that connection initialization was started, but failed never reaching Connected state Canceled = State("Canceled") // StateIPNotChanged means that consumer ip not changed after connection is created StateIPNotChanged = State("IPNotChanged") // StateConnectionFailed means that underlying connection is failed StateConnectionFailed = State("ConnectionFailed") // StateOnHold means that underlying connection failed, but manager keeps it not removed to prevent traffic leaks. StateOnHold = State("OnHold") )
View Source
const ( // SessionCreatedStatus represents a session creation event SessionCreatedStatus = "Created" // SessionEndedStatus represents a session end SessionEndedStatus = "Ended" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppEventConnectionSession ¶
AppEventConnectionSession represents a session related event
type AppEventConnectionState ¶
AppEventConnectionState is the struct we'll emit on a AppEventConnectionState topic event
type AppEventConnectionStatistics ¶
type AppEventConnectionStatistics struct { UUID string Stats Statistics SessionInfo Status }
AppEventConnectionStatistics represents a session statistics event
type Statistics ¶
Statistics represents connection statistics.
func (Statistics) Diff ¶
func (stats Statistics) Diff(new Statistics) Statistics
Diff calculates the difference in bytes between the old stats and new.
func (Statistics) Plus ¶
func (stats Statistics) Plus(diff Statistics) Statistics
Plus adds up the given statistics with the diff and returns new stats
func (Statistics) String ¶
func (stats Statistics) String() string
Click to show internal directories.
Click to hide internal directories.