Documentation
¶
Index ¶
- Constants
- type ContactInstance
- type ExpiredMap
- func (e *ExpiredMap) Clear()
- func (e *ExpiredMap) Close()
- func (e *ExpiredMap) Delete(key interface{})
- func (e *ExpiredMap) DoForEach(handler func(interface{}, interface{}))
- func (e *ExpiredMap) DoForEachWithBreak(handler func(interface{}, interface{}) bool)
- func (e *ExpiredMap) Get(key interface{}) (found bool, value interface{})
- func (e *ExpiredMap) Length() int
- func (e *ExpiredMap) Remove(key interface{})
- func (e *ExpiredMap) Set(key, value interface{}, expireSeconds int64)
- func (e *ExpiredMap) Size() int
- func (e *ExpiredMap) Stop()
- func (e *ExpiredMap) TTL(key interface{}) int64
- type MemoryRegistry
- func (mr *MemoryRegistry) AddAor(aor sip.Uri, instance *ContactInstance) error
- func (mr *MemoryRegistry) AorIsRegistered(aor sip.Uri) bool
- func (mr *MemoryRegistry) GetAllContacts() map[sip.Uri]map[string]*ContactInstance
- func (mr *MemoryRegistry) GetContacts(aor sip.Uri) (*map[string]*ContactInstance, bool)
- func (mr *MemoryRegistry) HandleConnectionError(connError *transport.ConnectionError) bool
- func (mr *MemoryRegistry) RemoveAor(aor sip.Uri) error
- func (mr *MemoryRegistry) RemoveContact(aor sip.Uri, instance *ContactInstance) error
- func (mr *MemoryRegistry) UpdateContact(aor sip.Uri, instance *ContactInstance) error
- type PNParams
- type PushCallback
- type Pusher
- type RFC8599
- type Registry
Constants ¶
View Source
const (
DefaultPNTimeout = 30 // s
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContactInstance ¶
type ContactInstance struct {
Contact *sip.ContactHeader
RegExpires uint32
LastUpdated uint32
Source string
UserAgent string
Transport string
}
func NewContactInstanceForRequest ¶
func NewContactInstanceForRequest(request sip.Request) *ContactInstance
func (*ContactInstance) GetPNParams ¶
func (c *ContactInstance) GetPNParams() *PNParams
type ExpiredMap ¶
type ExpiredMap struct {
// contains filtered or unexported fields
}
func NewExpiredMap ¶
func NewExpiredMap() *ExpiredMap
func (*ExpiredMap) Clear ¶
func (e *ExpiredMap) Clear()
func (*ExpiredMap) Close ¶
func (e *ExpiredMap) Close()
func (*ExpiredMap) Delete ¶
func (e *ExpiredMap) Delete(key interface{})
func (*ExpiredMap) DoForEach ¶
func (e *ExpiredMap) DoForEach(handler func(interface{}, interface{}))
func (*ExpiredMap) DoForEachWithBreak ¶
func (e *ExpiredMap) DoForEachWithBreak(handler func(interface{}, interface{}) bool)
func (*ExpiredMap) Get ¶
func (e *ExpiredMap) Get(key interface{}) (found bool, value interface{})
func (*ExpiredMap) Length ¶
func (e *ExpiredMap) Length() int
func (*ExpiredMap) Remove ¶
func (e *ExpiredMap) Remove(key interface{})
func (*ExpiredMap) Set ¶
func (e *ExpiredMap) Set(key, value interface{}, expireSeconds int64)
func (*ExpiredMap) Size ¶
func (e *ExpiredMap) Size() int
func (*ExpiredMap) Stop ¶
func (e *ExpiredMap) Stop()
func (*ExpiredMap) TTL ¶
func (e *ExpiredMap) TTL(key interface{}) int64
type MemoryRegistry ¶
type MemoryRegistry struct {
// contains filtered or unexported fields
}
MemoryRegistry Address-of-Record registry using memory.
func NewMemoryRegistry ¶
func NewMemoryRegistry() *MemoryRegistry
func (*MemoryRegistry) AddAor ¶
func (mr *MemoryRegistry) AddAor(aor sip.Uri, instance *ContactInstance) error
func (*MemoryRegistry) AorIsRegistered ¶
func (mr *MemoryRegistry) AorIsRegistered(aor sip.Uri) bool
func (*MemoryRegistry) GetAllContacts ¶
func (mr *MemoryRegistry) GetAllContacts() map[sip.Uri]map[string]*ContactInstance
func (*MemoryRegistry) GetContacts ¶
func (mr *MemoryRegistry) GetContacts(aor sip.Uri) (*map[string]*ContactInstance, bool)
func (*MemoryRegistry) HandleConnectionError ¶
func (mr *MemoryRegistry) HandleConnectionError(connError *transport.ConnectionError) bool
func (*MemoryRegistry) RemoveContact ¶
func (mr *MemoryRegistry) RemoveContact(aor sip.Uri, instance *ContactInstance) error
func (*MemoryRegistry) UpdateContact ¶
func (mr *MemoryRegistry) UpdateContact(aor sip.Uri, instance *ContactInstance) error
type PNParams ¶
type PNParams struct {
Provider string // PNS Provider (apns|fcm|other)
Param string
PRID string
PURR string
Expires uint32 //TODO:
}
type Pusher ¶
type Pusher struct {
CH chan *ContactInstance
// contains filtered or unexported fields
}
func (*Pusher) WaitContactOnline ¶
func (pn *Pusher) WaitContactOnline() (*ContactInstance, error)
type RFC8599 ¶
type RFC8599 struct {
PushCallback PushCallback
// contains filtered or unexported fields
}
func NewRFC8599 ¶
func NewRFC8599(callback PushCallback) *RFC8599
func (*RFC8599) HandleContactInstance ¶
func (r *RFC8599) HandleContactInstance(aor sip.Uri, instance *ContactInstance)
type Registry ¶
type Registry interface {
AddAor(aor sip.Uri, instance *ContactInstance) error
RemoveAor(aor sip.Uri) error
AorIsRegistered(aor sip.Uri) bool
UpdateContact(aor sip.Uri, instance *ContactInstance) error
RemoveContact(aor sip.Uri, instance *ContactInstance) error
GetContacts(aor sip.Uri) (*map[string]*ContactInstance, bool)
GetAllContacts() map[sip.Uri]map[string]*ContactInstance
HandleConnectionError(connError *transport.ConnectionError) bool
}
Registry Address-of-Record registry
Click to show internal directories.
Click to hide internal directories.