Documentation ¶
Index ¶
- Constants
- type Config
- type Stream
- func (m *Stream) AccountFeatures(_ context.Context) ([]string, error)
- func (m *Stream) Name() string
- func (m *Stream) ServerFeatures(_ context.Context) ([]string, error)
- func (m *Stream) Start(_ context.Context) error
- func (m *Stream) Stop(_ context.Context) error
- func (m *Stream) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)
Constants ¶
View Source
const ( // ModuleName represents stream module name. ModuleName = "stream_mgmt" // XEPNumber represents stream XEP number. XEPNumber = "0198" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // HibernateTime defines defines the amount of time a stream // can stay in disconnected state before being terminated. HibernateTime time.Duration // RequestAckInterval defines the period of stream inactivity // that should be waited before requesting acknowledgement. RequestAckInterval time.Duration // WaitForAckTimeout defines stanza acknowledgement timeout. WaitForAckTimeout time.Duration // MaxQueueSize defines maximum number of unacknowledged stanzas. // When the limit is reached the c2s stream is terminated. MaxQueueSize int }
Config contains stream management module configuration options.
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream represents a stream (XEP-0198) module type.
func New ¶
func New( router router.Router, hosts *host.Hosts, resMng *c2s.ResourceManager, hk *hook.Hooks, cfg Config, ) *Stream
New returns a new initialized Stream instance.
func (*Stream) AccountFeatures ¶
AccountFeatures returns stream account disco features.
func (*Stream) ServerFeatures ¶
ServerFeatures returns stream server disco features.
Click to show internal directories.
Click to hide internal directories.