Documentation ¶
Index ¶
- Constants
- type ContactInstance
- 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 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.