Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tracker ¶
type Tracker struct { // Duration is the API idle window Duration time.Duration // contains filtered or unexported fields }
Tracker holds the state for the server's idle tracking
func NewTracker ¶
NewTracker creates and initializes a new Tracker object For best behavior, duration should be 2x http idle connection timeout
func (*Tracker) ActiveConnections ¶
ActiveConnections returns the number of current managed or StateHijacked connections
func (*Tracker) Close ¶
func (t *Tracker) Close()
Close is used to update Tracker that a StateHijacked connection has been closed by handler (StateClosed)
func (*Tracker) ConnState ¶
ConnState is called on HTTP connection state changes.
- Once StateHijacked, StateClose is _NOT_ called on that connection
- There are two "idle" timeouts, the http idle connection (not to be confused with the TCP/IP idle socket timeout) and the API idle window. The caller should set the http idle timeout to 2x the time provided to NewTacker() which is the API idle window.
func (*Tracker) TotalConnections ¶
TotalConnections returns total number of connections made to this instance of the service
Click to show internal directories.
Click to hide internal directories.