Documentation ¶
Index ¶
- Constants
- type Config
- type Ping
- func (p *Ping) AccountFeatures(_ context.Context) ([]string, error)
- func (p *Ping) MatchesNamespace(namespace string, _ bool) bool
- func (p *Ping) Name() string
- func (p *Ping) ProcessIQ(ctx context.Context, iq *stravaganza.IQ) error
- func (p *Ping) ServerFeatures(_ context.Context) ([]string, error)
- func (p *Ping) Start(_ context.Context) error
- func (p *Ping) Stop(_ context.Context) error
- func (p *Ping) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)
Constants ¶
View Source
const ( // ModuleName represents ping module name. ModuleName = "ping" // XEPNumber represents ping XEP number. XEPNumber = "0199" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // AckTimeout tells how long should we wait until considering a client to be disconnected. AckTimeout time.Duration `fig:"ack_timeout" default:"32s"` // Interval tells how often pings should be sent to clients. Interval time.Duration `fig:"interval" default:"1m"` // SendPings tells whether server pings should be sent. SendPings bool `fig:"send_pings"` // TimeoutAction specifies the action to be taken when a client is considered as disconnected. TimeoutAction string `fig:"timeout_action" default:"none"` }
Config contains ping module configuration options.
type Ping ¶
type Ping struct {
// contains filtered or unexported fields
}
Ping represents ping (XEP-0199) module type.
func (*Ping) AccountFeatures ¶
AccountFeatures returns ping account disco features.
func (*Ping) MatchesNamespace ¶
MatchesNamespace tells whether namespace matches ping module.
func (*Ping) ServerFeatures ¶
ServerFeatures returns ping server disco features.
func (*Ping) StreamFeature ¶
StreamFeature returns ping module stream feature.
Click to show internal directories.
Click to hide internal directories.