Documentation ¶
Index ¶
- Constants
- func NewHttp1Client(connectTimeout int, responseReadTimeout int) *http.Client
- func NewHttp2Client(connectTimeout int, responseReadTimeout int) *http.Client
- type AddChannelToChannelGroupBuilder
- func (b *AddChannelToChannelGroupBuilder) ChannelGroup(cg string) *AddChannelToChannelGroupBuilder
- func (b *AddChannelToChannelGroupBuilder) Channels(ch []string) *AddChannelToChannelGroupBuilder
- func (b *AddChannelToChannelGroupBuilder) Execute() (*AddChannelToChannelGroupResponse, StatusResponse, error)
- func (b *AddChannelToChannelGroupBuilder) Transport(tr http.RoundTripper) *AddChannelToChannelGroupBuilder
- type AddChannelToChannelGroupResponse
- type AddPushNotificationsOnChannelsBuilder
- func (b *AddPushNotificationsOnChannelsBuilder) Channels(channels []string) *AddPushNotificationsOnChannelsBuilder
- func (b *AddPushNotificationsOnChannelsBuilder) DeviceIDForPush(deviceID string) *AddPushNotificationsOnChannelsBuilder
- func (b *AddPushNotificationsOnChannelsBuilder) Execute() (*AddPushNotificationsOnChannelsResponse, StatusResponse, error)
- func (b *AddPushNotificationsOnChannelsBuilder) PushType(pushType PNPushType) *AddPushNotificationsOnChannelsBuilder
- type AddPushNotificationsOnChannelsResponse
- type AllChannelGroupResponse
- type Config
- type Context
- type DeleteChannelGroupResponse
- type FetchResponse
- type FetchResponseItem
- type GetStateResponse
- type GrantResponse
- type HereNowChannelData
- type HereNowOccupantsData
- type HereNowResponse
- type HistoryDeleteResponse
- type HistoryResponse
- type HistoryResponseItem
- type LatencyEntry
- type ListPushProvisionsRequestBuilder
- func (b *ListPushProvisionsRequestBuilder) DeviceIDForPush(deviceID string) *ListPushProvisionsRequestBuilder
- func (b *ListPushProvisionsRequestBuilder) Execute() (*ListPushProvisionsRequestResponse, StatusResponse, error)
- func (b *ListPushProvisionsRequestBuilder) PushType(pushType PNPushType) *ListPushProvisionsRequestBuilder
- type ListPushProvisionsRequestResponse
- type Listener
- type ListenerManager
- type OperationType
- type Operations
- type PNAccessManagerKeyData
- type PNMessage
- type PNPAMEntityData
- type PNPresence
- type PNPushType
- type PNStatus
- type PubNub
- func (pn *PubNub) AddChannelToChannelGroup() *AddChannelToChannelGroupBuilder
- func (pn *PubNub) AddChannelToChannelGroupWithContext(ctx Context) *AddChannelToChannelGroupBuilder
- func (pn *PubNub) AddListener(listener *Listener)
- func (pn *PubNub) AddPushNotificationsOnChannels() *AddPushNotificationsOnChannelsBuilder
- func (pn *PubNub) AddPushNotificationsOnChannelsWithContext(ctx Context) *AddPushNotificationsOnChannelsBuilder
- func (pn *PubNub) DeleteChannelGroup() *deleteChannelGroupBuilder
- func (pn *PubNub) DeleteChannelGroupWithContext(ctx Context) *deleteChannelGroupBuilder
- func (pn *PubNub) DeleteMessages() *historyDeleteBuilder
- func (pn *PubNub) DeleteMessagesWithContext() *historyDeleteBuilder
- func (pn *PubNub) Destroy()
- func (pn *PubNub) Fetch() *fetchBuilder
- func (pn *PubNub) FetchWithContext(ctx Context) *fetchBuilder
- func (pn *PubNub) Fire() *fireBuilder
- func (pn *PubNub) FireWithContext(ctx Context) *fireBuilder
- func (pn *PubNub) GetClient() *http.Client
- func (pn *PubNub) GetListeners() map[*Listener]bool
- func (pn *PubNub) GetState() *getStateBuilder
- func (pn *PubNub) GetStateWithContext(ctx Context) *getStateBuilder
- func (pn *PubNub) GetSubscribeClient() *http.Client
- func (pn *PubNub) GetSubscribedChannels() []string
- func (pn *PubNub) GetSubscribedGroups() []string
- func (pn *PubNub) Grant() *grantBuilder
- func (pn *PubNub) GrantWithContext(ctx Context) *grantBuilder
- func (pn *PubNub) HereNow() *hereNowBuilder
- func (pn *PubNub) HereNowWithContext(ctx Context) *hereNowBuilder
- func (pn *PubNub) History() *historyBuilder
- func (pn *PubNub) HistoryWithContext(ctx Context) *historyBuilder
- func (pn *PubNub) Leave() *leaveBuilder
- func (pn *PubNub) LeaveWithContext(ctx Context) *leaveBuilder
- func (pn *PubNub) ListChannelsInChannelGroup() *allChannelGroupBuilder
- func (pn *PubNub) ListChannelsInChannelGroupWithContext(ctx Context) *allChannelGroupBuilder
- func (pn *PubNub) ListPushProvisions() *ListPushProvisionsRequestBuilder
- func (pn *PubNub) ListPushProvisionsWithContext(ctx Context) *ListPushProvisionsRequestBuilder
- func (pn *PubNub) Publish() *publishBuilder
- func (pn *PubNub) PublishWithContext(ctx Context) *publishBuilder
- func (pn *PubNub) RemoveAllPushNotifications() *RemoveAllPushChannelsForDeviceBuilder
- func (pn *PubNub) RemoveAllPushNotificationsWithContext(ctx Context) *RemoveAllPushChannelsForDeviceBuilder
- func (pn *PubNub) RemoveChannelFromChannelGroup() *RemoveChannelFromChannelGroupBuilder
- func (pn *PubNub) RemoveChannelFromChannelGroupWithContext(ctx Context) *RemoveChannelFromChannelGroupBuilder
- func (pn *PubNub) RemoveListener(listener *Listener)
- func (pn *PubNub) RemovePushNotificationsFromChannels() *RemoveChannelsFromPushBuilder
- func (pn *PubNub) RemovePushNotificationsFromChannelsWithContext(ctx Context) *RemoveChannelsFromPushBuilder
- func (pn *PubNub) SetClient(c *http.Client)
- func (pn *PubNub) SetState() *setStateBuilder
- func (pn *PubNub) SetStateWithContext(ctx Context) *setStateBuilder
- func (pn *PubNub) SetSubscribeClient(client *http.Client)
- func (pn *PubNub) Subscribe() *subscribeBuilder
- func (pn *PubNub) Time() *timeBuilder
- func (pn *PubNub) TimeWithContext(ctx Context) *timeBuilder
- func (pn *PubNub) Unsubscribe() *unsubscribeBuilder
- func (pn *PubNub) UnsubscribeAll()
- func (pn *PubNub) WhereNow() *whereNowBuilder
- func (pn *PubNub) WhereNowWithContext(ctx Context) *whereNowBuilder
- type PublishResponse
- type ReconnectionManager
- type ReconnectionPolicy
- type RemoveAllPushChannelsForDeviceBuilder
- func (b *RemoveAllPushChannelsForDeviceBuilder) DeviceIDForPush(deviceID string) *RemoveAllPushChannelsForDeviceBuilder
- func (b *RemoveAllPushChannelsForDeviceBuilder) Execute() (*RemoveAllPushChannelsForDeviceResponse, StatusResponse, error)
- func (b *RemoveAllPushChannelsForDeviceBuilder) PushType(pushType PNPushType) *RemoveAllPushChannelsForDeviceBuilder
- type RemoveAllPushChannelsForDeviceResponse
- type RemoveChannelFromChannelGroupBuilder
- func (b *RemoveChannelFromChannelGroupBuilder) ChannelGroup(cg string) *RemoveChannelFromChannelGroupBuilder
- func (b *RemoveChannelFromChannelGroupBuilder) Channels(ch []string) *RemoveChannelFromChannelGroupBuilder
- func (b *RemoveChannelFromChannelGroupBuilder) Execute() (*RemoveChannelFromChannelGroupResponse, StatusResponse, error)
- type RemoveChannelFromChannelGroupResponse
- type RemoveChannelsFromPushBuilder
- func (b *RemoveChannelsFromPushBuilder) Channels(channels []string) *RemoveChannelsFromPushBuilder
- func (b *RemoveChannelsFromPushBuilder) DeviceIDForPush(deviceID string) *RemoveChannelsFromPushBuilder
- func (b *RemoveChannelsFromPushBuilder) Execute() (*RemoveChannelsFromPushResponse, StatusResponse, error)
- func (b *RemoveChannelsFromPushBuilder) PushType(pushType PNPushType) *RemoveChannelsFromPushBuilder
- type RemoveChannelsFromPushResponse
- type ResponseInfo
- type SetStateResponse
- type StateManager
- type StateOperation
- type StatusCategory
- type StatusResponse
- type SubscribeOperation
- type SubscribeResponse
- type SubscriptionItem
- type SubscriptionManager
- func (m *SubscriptionManager) AddListener(listener *Listener)
- func (m *SubscriptionManager) Destroy()
- func (m *SubscriptionManager) Disconnect()
- func (m *SubscriptionManager) GetListeners() map[*Listener]bool
- func (m *SubscriptionManager) RemoveAllListeners()
- func (m *SubscriptionManager) RemoveListener(listener *Listener)
- type TelemetryManager
- type TimeResponse
- type UnsubscribeOperation
- type WhereNowResponse
Constants ¶
View Source
const ( Version = "4.0.0-rc.5" MaxSequence = 65535 )
Default constants
View Source
const ( StrMissingPubKey = "Missing Publish Key" StrMissingSubKey = "Missing Subscribe Key" StrMissingChannel = "Missing Channel" StrMissingChannelGroup = "Missing Channel Group" StrMissingMessage = "Missing Message" StrMissingSecretKey = "Missing Secret Key" StrMissingUuid = "Missing Uuid" StrMissingDeviceID = "Missing Device ID" StrMissingPushType = "Missing Push Type" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddChannelToChannelGroupBuilder ¶
type AddChannelToChannelGroupBuilder struct {
// contains filtered or unexported fields
}
func (*AddChannelToChannelGroupBuilder) ChannelGroup ¶
func (b *AddChannelToChannelGroupBuilder) ChannelGroup( cg string) *AddChannelToChannelGroupBuilder
func (*AddChannelToChannelGroupBuilder) Channels ¶
func (b *AddChannelToChannelGroupBuilder) Channels( ch []string) *AddChannelToChannelGroupBuilder
func (*AddChannelToChannelGroupBuilder) Execute ¶
func (b *AddChannelToChannelGroupBuilder) Execute() ( *AddChannelToChannelGroupResponse, StatusResponse, error)
func (*AddChannelToChannelGroupBuilder) Transport ¶
func (b *AddChannelToChannelGroupBuilder) Transport( tr http.RoundTripper) *AddChannelToChannelGroupBuilder
type AddChannelToChannelGroupResponse ¶
type AddChannelToChannelGroupResponse struct { }
type AddPushNotificationsOnChannelsBuilder ¶
type AddPushNotificationsOnChannelsBuilder struct {
// contains filtered or unexported fields
}
func (*AddPushNotificationsOnChannelsBuilder) Channels ¶
func (b *AddPushNotificationsOnChannelsBuilder) Channels( channels []string) *AddPushNotificationsOnChannelsBuilder
func (*AddPushNotificationsOnChannelsBuilder) DeviceIDForPush ¶
func (b *AddPushNotificationsOnChannelsBuilder) DeviceIDForPush( deviceID string) *AddPushNotificationsOnChannelsBuilder
func (*AddPushNotificationsOnChannelsBuilder) Execute ¶
func (b *AddPushNotificationsOnChannelsBuilder) Execute() ( *AddPushNotificationsOnChannelsResponse, StatusResponse, error)
func (*AddPushNotificationsOnChannelsBuilder) PushType ¶
func (b *AddPushNotificationsOnChannelsBuilder) PushType( pushType PNPushType) *AddPushNotificationsOnChannelsBuilder
type AddPushNotificationsOnChannelsResponse ¶
type AddPushNotificationsOnChannelsResponse struct{}
type AllChannelGroupResponse ¶
type Config ¶
type Config struct { PublishKey string SubscribeKey string SecretKey string AuthKey string Origin string Uuid string CipherKey string Secure bool // net.Dialer.Timeout ConnectTimeout int // http.Client.Timeout for non-subscribe requests NonSubscribeRequestTimeout int // http.Client.Timeout for subscribe requests only SubscribeRequestTimeout int HeartbeatInterval int PresenceTimeout int MaximumReconnectionRetries int MaximumLatencyDataAge int FilterExpression string PNReconnectionPolicy ReconnectionPolicy Log *log.Logger SuppressLeaveEvents bool DisablePNOtherProcessing bool UseHttp2 bool }
func NewDemoConfig ¶
func NewDemoConfig() *Config
func (*Config) SetPresenceTimeout ¶
func (*Config) SetPresenceTimeoutWithCustomInterval ¶
type DeleteChannelGroupResponse ¶
type DeleteChannelGroupResponse struct{}
type FetchResponse ¶
type FetchResponse struct {
Messages map[string][]FetchResponseItem
}
type FetchResponseItem ¶
type FetchResponseItem struct { Message interface{} Timetoken string }
type GetStateResponse ¶
type GetStateResponse struct {
State map[string]interface{}
}
type GrantResponse ¶
type GrantResponse struct { Level string SubscribeKey string Ttl int Channels map[string]*PNPAMEntityData ChannelGroups map[string]*PNPAMEntityData ReadEnabled bool WriteEnabled bool ManageEnabled bool }
type HereNowChannelData ¶
type HereNowChannelData struct { ChannelName string Occupancy int Occupants []HereNowOccupantsData }
type HereNowOccupantsData ¶
type HereNowResponse ¶
type HereNowResponse struct { TotalChannels int TotalOccupancy int Channels []HereNowChannelData }
type HistoryDeleteResponse ¶
type HistoryDeleteResponse struct { }
type HistoryResponse ¶
type HistoryResponse struct { Messages []HistoryResponseItem StartTimetoken int64 EndTimetoken int64 }
type HistoryResponseItem ¶
type HistoryResponseItem struct { Message interface{} Timetoken int64 }
type LatencyEntry ¶
type ListPushProvisionsRequestBuilder ¶
type ListPushProvisionsRequestBuilder struct {
// contains filtered or unexported fields
}
func (*ListPushProvisionsRequestBuilder) DeviceIDForPush ¶
func (b *ListPushProvisionsRequestBuilder) DeviceIDForPush( deviceID string) *ListPushProvisionsRequestBuilder
func (*ListPushProvisionsRequestBuilder) Execute ¶
func (b *ListPushProvisionsRequestBuilder) Execute() ( *ListPushProvisionsRequestResponse, StatusResponse, error)
func (*ListPushProvisionsRequestBuilder) PushType ¶
func (b *ListPushProvisionsRequestBuilder) PushType( pushType PNPushType) *ListPushProvisionsRequestBuilder
type ListPushProvisionsRequestResponse ¶
type ListPushProvisionsRequestResponse struct {
Channels []string
}
type Listener ¶
type Listener struct { Status chan *PNStatus Message chan *PNMessage Presence chan *PNPresence }
func NewListener ¶
func NewListener() *Listener
type ListenerManager ¶
type OperationType ¶
type OperationType int
const ( PNSubscribeOperation OperationType = 1 + iota PNUnsubscribeOperation PNPublishOperation PNFireOperation PNHistoryOperation PNFetchMessagesOperation PNWhereNowOperation PNHereNowOperation PNHeartBeatOperation PNSetStateOperation PNGetStateOperation PNAddChannelsToChannelGroupOperation PNRemoveChannelFromChannelGroupOperation PNRemoveGroupOperation PNChannelsForGroupOperation PNPushNotificationsEnabledChannelsOperation PNAddPushNotificationsOnChannelsOperation PNRemovePushNotificationsFromChannelsOperation PNRemoveAllPushNotificationsOperation PNTimeOperation PNAccessManagerGrant PNAccessManagerRevoke PNDeleteMessagesOperation )
func (OperationType) String ¶
func (t OperationType) String() string
type Operations ¶
type Operations struct {
// contains filtered or unexported fields
}
type PNAccessManagerKeyData ¶
type PNPAMEntityData ¶
type PNPresence ¶
type PNPushType ¶
type PNPushType int
const ( PNPushTypeNone PNPushType = 1 + iota PNPushTypeGCM PNPushTypeAPNS PNPushTypeMPNS )
func (PNPushType) String ¶
func (p PNPushType) String() string
type PubNub ¶
No server connection will be established when you create a new PubNub object. To establish a new connection use Subscribe() function of PubNub type.
func NewPubNubDemo ¶
func NewPubNubDemo() *PubNub
func (*PubNub) AddChannelToChannelGroup ¶
func (pn *PubNub) AddChannelToChannelGroup() *AddChannelToChannelGroupBuilder
func (*PubNub) AddChannelToChannelGroupWithContext ¶
func (pn *PubNub) AddChannelToChannelGroupWithContext( ctx Context) *AddChannelToChannelGroupBuilder
func (*PubNub) AddListener ¶
func (*PubNub) AddPushNotificationsOnChannels ¶
func (pn *PubNub) AddPushNotificationsOnChannels() *AddPushNotificationsOnChannelsBuilder
func (*PubNub) AddPushNotificationsOnChannelsWithContext ¶
func (pn *PubNub) AddPushNotificationsOnChannelsWithContext( ctx Context) *AddPushNotificationsOnChannelsBuilder
func (*PubNub) DeleteChannelGroup ¶
func (pn *PubNub) DeleteChannelGroup() *deleteChannelGroupBuilder
func (*PubNub) DeleteChannelGroupWithContext ¶
func (*PubNub) DeleteMessages ¶
func (pn *PubNub) DeleteMessages() *historyDeleteBuilder
func (*PubNub) DeleteMessagesWithContext ¶
func (pn *PubNub) DeleteMessagesWithContext() *historyDeleteBuilder
func (*PubNub) FetchWithContext ¶
func (*PubNub) FireWithContext ¶
func (*PubNub) GetListeners ¶
func (*PubNub) GetStateWithContext ¶
func (*PubNub) GetSubscribeClient ¶
Set a client for transactional requests
func (*PubNub) GetSubscribedChannels ¶
func (*PubNub) GetSubscribedGroups ¶
func (*PubNub) GrantWithContext ¶
func (*PubNub) HereNowWithContext ¶
func (*PubNub) HistoryWithContext ¶
func (*PubNub) LeaveWithContext ¶
func (*PubNub) ListChannelsInChannelGroup ¶
func (pn *PubNub) ListChannelsInChannelGroup() *allChannelGroupBuilder
func (*PubNub) ListChannelsInChannelGroupWithContext ¶
func (*PubNub) ListPushProvisions ¶
func (pn *PubNub) ListPushProvisions() *ListPushProvisionsRequestBuilder
func (*PubNub) ListPushProvisionsWithContext ¶
func (pn *PubNub) ListPushProvisionsWithContext( ctx Context) *ListPushProvisionsRequestBuilder
func (*PubNub) PublishWithContext ¶
func (*PubNub) RemoveAllPushNotifications ¶
func (pn *PubNub) RemoveAllPushNotifications() *RemoveAllPushChannelsForDeviceBuilder
func (*PubNub) RemoveAllPushNotificationsWithContext ¶
func (pn *PubNub) RemoveAllPushNotificationsWithContext( ctx Context) *RemoveAllPushChannelsForDeviceBuilder
func (*PubNub) RemoveChannelFromChannelGroup ¶
func (pn *PubNub) RemoveChannelFromChannelGroup() *RemoveChannelFromChannelGroupBuilder
func (*PubNub) RemoveChannelFromChannelGroupWithContext ¶
func (pn *PubNub) RemoveChannelFromChannelGroupWithContext( ctx Context) *RemoveChannelFromChannelGroupBuilder
func (*PubNub) RemoveListener ¶
func (*PubNub) RemovePushNotificationsFromChannels ¶
func (pn *PubNub) RemovePushNotificationsFromChannels() *RemoveChannelsFromPushBuilder
func (*PubNub) RemovePushNotificationsFromChannelsWithContext ¶
func (pn *PubNub) RemovePushNotificationsFromChannelsWithContext( ctx Context) *RemoveChannelsFromPushBuilder
func (*PubNub) SetStateWithContext ¶
func (*PubNub) SetSubscribeClient ¶
func (*PubNub) TimeWithContext ¶
func (*PubNub) Unsubscribe ¶
func (pn *PubNub) Unsubscribe() *unsubscribeBuilder
func (*PubNub) UnsubscribeAll ¶
func (pn *PubNub) UnsubscribeAll()
func (*PubNub) WhereNowWithContext ¶
type PublishResponse ¶
type PublishResponse struct {
Timestamp int
}
type ReconnectionManager ¶
type ReconnectionManager struct { sync.RWMutex ExponentialMultiplier int FailedCalls int Milliseconds int OnReconnection func() OnMaxReconnectionExhaustion func() DoneTimer chan bool // contains filtered or unexported fields }
func (*ReconnectionManager) GetExponentialInterval ¶
func (m *ReconnectionManager) GetExponentialInterval() int
func (*ReconnectionManager) HandleOnMaxReconnectionExhaustion ¶
func (m *ReconnectionManager) HandleOnMaxReconnectionExhaustion(handler func())
func (*ReconnectionManager) HandleReconnection ¶
func (m *ReconnectionManager) HandleReconnection(handler func())
type ReconnectionPolicy ¶
type ReconnectionPolicy int
const ( PNNonePolicy ReconnectionPolicy = 1 + iota PNLinearPolicy PNExponentialPolicy )
type RemoveAllPushChannelsForDeviceBuilder ¶
type RemoveAllPushChannelsForDeviceBuilder struct {
// contains filtered or unexported fields
}
func (*RemoveAllPushChannelsForDeviceBuilder) DeviceIDForPush ¶
func (b *RemoveAllPushChannelsForDeviceBuilder) DeviceIDForPush( deviceID string) *RemoveAllPushChannelsForDeviceBuilder
func (*RemoveAllPushChannelsForDeviceBuilder) Execute ¶
func (b *RemoveAllPushChannelsForDeviceBuilder) Execute() ( *RemoveAllPushChannelsForDeviceResponse, StatusResponse, error)
func (*RemoveAllPushChannelsForDeviceBuilder) PushType ¶
func (b *RemoveAllPushChannelsForDeviceBuilder) PushType( pushType PNPushType) *RemoveAllPushChannelsForDeviceBuilder
type RemoveAllPushChannelsForDeviceResponse ¶
type RemoveAllPushChannelsForDeviceResponse struct{}
type RemoveChannelFromChannelGroupBuilder ¶
type RemoveChannelFromChannelGroupBuilder struct {
// contains filtered or unexported fields
}
func (*RemoveChannelFromChannelGroupBuilder) ChannelGroup ¶
func (b *RemoveChannelFromChannelGroupBuilder) ChannelGroup( cg string) *RemoveChannelFromChannelGroupBuilder
func (*RemoveChannelFromChannelGroupBuilder) Channels ¶
func (b *RemoveChannelFromChannelGroupBuilder) Channels( ch []string) *RemoveChannelFromChannelGroupBuilder
func (*RemoveChannelFromChannelGroupBuilder) Execute ¶
func (b *RemoveChannelFromChannelGroupBuilder) Execute() ( *RemoveChannelFromChannelGroupResponse, StatusResponse, error)
type RemoveChannelFromChannelGroupResponse ¶
type RemoveChannelFromChannelGroupResponse struct { }
type RemoveChannelsFromPushBuilder ¶
type RemoveChannelsFromPushBuilder struct {
// contains filtered or unexported fields
}
func (*RemoveChannelsFromPushBuilder) Channels ¶
func (b *RemoveChannelsFromPushBuilder) Channels( channels []string) *RemoveChannelsFromPushBuilder
func (*RemoveChannelsFromPushBuilder) DeviceIDForPush ¶
func (b *RemoveChannelsFromPushBuilder) DeviceIDForPush( deviceID string) *RemoveChannelsFromPushBuilder
func (*RemoveChannelsFromPushBuilder) Execute ¶
func (b *RemoveChannelsFromPushBuilder) Execute() ( *RemoveChannelsFromPushResponse, StatusResponse, error)
func (*RemoveChannelsFromPushBuilder) PushType ¶
func (b *RemoveChannelsFromPushBuilder) PushType( pushType PNPushType) *RemoveChannelsFromPushBuilder
type RemoveChannelsFromPushResponse ¶
type RemoveChannelsFromPushResponse struct{}
type ResponseInfo ¶
type SetStateResponse ¶
type SetStateResponse struct { State interface{} Message string }
type StateManager ¶
type StateOperation ¶
type StateOperation struct {
// contains filtered or unexported fields
}
type StatusCategory ¶
type StatusCategory int
const ( PNUnknownCategory StatusCategory = 1 + iota // Request timeout reached PNTimeoutCategory // Subscribe received an initial timetoken PNConnectedCategory // Disconnected due network error PNDisconnectedCategory // Context cancelled PNCancelledCategory PNLoopStopCategory PNAcknowledgmentCategory PNBadRequestCategory PNAccessDeniedCategory PNNoStubMatchedCategory PNReconnectedCategory PNReconnectionAttemptsExhausted )
func (StatusCategory) String ¶
func (c StatusCategory) String() string
type StatusResponse ¶
type SubscribeOperation ¶
type SubscribeResponse ¶
type SubscribeResponse struct { }
type SubscriptionItem ¶
type SubscriptionItem struct {
// contains filtered or unexported fields
}
type SubscriptionManager ¶
func (*SubscriptionManager) AddListener ¶
func (m *SubscriptionManager) AddListener(listener *Listener)
func (*SubscriptionManager) Destroy ¶
func (m *SubscriptionManager) Destroy()
func (*SubscriptionManager) Disconnect ¶
func (m *SubscriptionManager) Disconnect()
func (*SubscriptionManager) GetListeners ¶
func (m *SubscriptionManager) GetListeners() map[*Listener]bool
func (*SubscriptionManager) RemoveAllListeners ¶
func (m *SubscriptionManager) RemoveAllListeners()
func (*SubscriptionManager) RemoveListener ¶
func (m *SubscriptionManager) RemoveListener(listener *Listener)
type TelemetryManager ¶
type TelemetryManager struct { sync.RWMutex ExitTelemetryManager chan bool // contains filtered or unexported fields }
func (*TelemetryManager) CleanUpTelemetryData ¶
func (m *TelemetryManager) CleanUpTelemetryData()
func (*TelemetryManager) OperationLatency ¶
func (m *TelemetryManager) OperationLatency() map[string]string
func (*TelemetryManager) StoreLatency ¶
func (m *TelemetryManager) StoreLatency(latency float64, t OperationType)
type TimeResponse ¶
type TimeResponse struct {
Timetoken int64
}
type UnsubscribeOperation ¶
type WhereNowResponse ¶
type WhereNowResponse struct {
Channels []string
}
Source Files ¶
- add_channel_channel_group_request.go
- add_channels_to_push_request.go
- clients.go
- config.go
- context.go
- delete_channel_group_request.go
- endpoints.go
- enums.go
- fetch_request.go
- fire_request.go
- get_state_request.go
- grant_request.go
- heartbeat_request.go
- here_now_request.go
- history_delete_request.go
- history_request.go
- leave_request.go
- list_all_channel_group_request.go
- list_push_provisions_request.go
- listener_manager.go
- publish_request.go
- pubnub.go
- reconnection_manager.go
- remove_all_push_channels_request.go
- remove_channel_channel_group_request.go
- remove_channels_from_push_request.go
- request.go
- request_context.go
- set_state_request.go
- state_manager.go
- subscribe_context_helper_1_7.go
- subscribe_request.go
- subscription_manager.go
- telemetry_manager.go
- time_request.go
- unsubscribe_builder.go
- where_now_request.go
Click to show internal directories.
Click to hide internal directories.