Documentation
¶
Overview ¶
Package xep0215 implements XEP-0215: External Service Discovery.
Index ¶
- Constants
- type Config
- type ExtDisco
- func (x *ExtDisco) AccountFeatures(_ context.Context) ([]string, error)
- func (x *ExtDisco) MatchesNamespace(namespace string, serverTarget bool) bool
- func (x *ExtDisco) Name() string
- func (x *ExtDisco) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error
- func (x *ExtDisco) ServerFeatures(_ context.Context) ([]string, error)
- func (x *ExtDisco) Start(_ context.Context) error
- func (x *ExtDisco) Stop(_ context.Context) error
- func (x *ExtDisco) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)
- type ServiceConfig
Constants ¶
View Source
const ( // ModuleName represents external service discovery module name. ModuleName = "extdisco" // XEPNumber represents external service discovery XEP number. XEPNumber = "0215" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Services []ServiceConfig `fig:"services"`
// When set, TURN services will return time-limited HMAC-SHA1 credentials instead of
// static username/password. This implements RFC 5766 / XEP-0215 restricted credentials.
SharedSecret string `fig:"shared_secret"`
}
Config contains external service discovery module configuration.
type ExtDisco ¶
type ExtDisco struct {
// contains filtered or unexported fields
}
ExtDisco represents an external service discovery (XEP-0215) module type.
func (*ExtDisco) AccountFeatures ¶
AccountFeatures returns module account disco features.
func (*ExtDisco) MatchesNamespace ¶
MatchesNamespace tells whether namespace matches this module.
func (*ExtDisco) ServerFeatures ¶
ServerFeatures returns module server disco features.
func (*ExtDisco) StreamFeature ¶
StreamFeature returns module stream feature.
type ServiceConfig ¶
type ServiceConfig struct {
Host string `fig:"host"`
Port int `fig:"port"`
Type string `fig:"type"` // "stun" or "turn"
Transport string `fig:"transport"` // "udp" or "tcp"
Username string `fig:"username"` // TURN credentials
Password string `fig:"password"` // TURN credentials
}
ServiceConfig contains configuration for a single external service.
Click to show internal directories.
Click to hide internal directories.