Documentation ¶
Index ¶
- type ExtModule
- func (m *ExtModule) AccountFeatures(ctx context.Context) ([]string, error)
- func (m *ExtModule) InterceptStanza(ctx context.Context, stanza stravaganza.Stanza, id int) (stravaganza.Stanza, error)
- func (m *ExtModule) Interceptors() []module.StanzaInterceptor
- func (m *ExtModule) MatchesNamespace(namespace string) bool
- func (m *ExtModule) Name() string
- func (m *ExtModule) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error
- func (m *ExtModule) ServerFeatures(ctx context.Context) ([]string, error)
- func (m *ExtModule) Start(ctx context.Context) error
- func (m *ExtModule) Stop(_ context.Context) error
- func (m *ExtModule) StreamFeature(ctx context.Context, domain string) (stravaganza.Element, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtModule ¶
type ExtModule struct {
// contains filtered or unexported fields
}
ExtModule represents an external module.
func New ¶
func New( address string, isSecure bool, router router.Router, sonar *sonar.Sonar, opts Options, ) *ExtModule
New returns a new initialized ExtModule instance.
func (*ExtModule) AccountFeatures ¶
AccountFeatures returns module account features.
func (*ExtModule) InterceptStanza ¶ added in v0.52.2
func (m *ExtModule) InterceptStanza(ctx context.Context, stanza stravaganza.Stanza, id int) (stravaganza.Stanza, error)
InterceptStanza will be invoked to allow stanza transformation based on a StanzaInterceptor definition.
func (*ExtModule) Interceptors ¶ added in v0.52.2
func (m *ExtModule) Interceptors() []module.StanzaInterceptor
Interceptors returns a set of all module interceptors.
func (*ExtModule) MatchesNamespace ¶
MatchesNamespace tells whether namespace matches external iq handler.
func (*ExtModule) ProcessIQ ¶
ProcessIQ will be invoked whenever iq stanza should be processed by this external module.
func (*ExtModule) ServerFeatures ¶
ServerFeatures returns module server features.
func (*ExtModule) StreamFeature ¶
StreamFeature returns external module stream feature elements.
type Options ¶
type Options struct { // RequestTimeout defines external module request timeout. RequestTimeout time.Duration // Topics defines all topics to which a external module wants to subscribe to. Topics []string // NamespaceMatcher defines external module namespace matcher. NamespaceMatcher stringmatcher.Matcher // Interceptors contains external module StanzaInterceptor set. Interceptors []module.StanzaInterceptor }
Options defines external module options set.
Click to show internal directories.
Click to hide internal directories.