Documentation ¶
Overview ¶
Package session handles the minutiae of interacting with the Push Notifications server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressedNotification ¶
type AddressedNotification struct { To *click.AppId Notification *protocol.Notification }
AddressedNotification carries both a protocol.Notification and a parsed AppId addressee.
type AddresseeChecking ¶
type AddresseeChecking interface { StartAddresseeBatch() CheckForAddressee(*protocol.Notification) *click.AppId }
AddresseeChecking can check if a notification can be delivered.
type BroadcastNotification ¶
type ClientSession ¶
type ClientSession interface { ResetCookie() State() ClientSessionState HasConnectivity(bool) KeepConnection() error StopKeepConnection() }
ClientSession holds a client<->server session and its configuration.
type ClientSessionConfig ¶
type ClientSessionConfig struct { ConnectTimeout time.Duration ExchangeTimeout time.Duration HostsCachingExpiryTime time.Duration ExpectAllRepairedTime time.Duration PEM []byte Info map[string]interface{} AddresseeChecker AddresseeChecking BroadcastCh chan *BroadcastNotification NotificationsCh chan AddressedNotification }
ClientSessionConfig groups the client session configuration.
type ClientSessionState ¶
type ClientSessionState uint32
ClientSessionState is a way to broadly track the progress of the session
const ( Error ClientSessionState = iota Pristine Disconnected Connected Started Running Shutdown Unknown )
func (ClientSessionState) String ¶
func (s ClientSessionState) String() string
Click to show internal directories.
Click to hide internal directories.