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 the amount of time a stream // can stay in disconnected state before being terminated. HibernateTime time.Duration `fig:"hibernate_time" default:"3m"` // RequestAckInterval defines the period of stream inactivity // that should be waited before requesting acknowledgement. RequestAckInterval time.Duration `fig:"request_ack_interval" default:"1m"` // WaitForAckTimeout defines stanza acknowledgement timeout. WaitForAckTimeout time.Duration `fig:"wait_for_ack_timeout" default:"30s"` // MaxQueueSize defines maximum number of unacknowledged stanzas. // When the limit is reached the c2s stream is terminated. MaxQueueSize int `fig:"max_queue_size" default:"250"` }
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( cfg Config, stmQueueMap *streamqueue.QueueMap, clusterConnMng *clusterconnmanager.Manager, router router.Router, hosts *host.Hosts, resMng resourcemanager.Manager, hk *hook.Hooks, logger kitlog.Logger, ) *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.
func (*Stream) StreamFeature ¶
StreamFeature returns stream module stream feature.
Click to show internal directories.
Click to hide internal directories.