xep0352

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package xep0352 implements XEP-0352: Client State Indication.

Index

Constants

View Source
const (
	// ModuleName represents CSI module name.
	ModuleName = "csi"

	// XEPNumber represents CSI XEP number.
	XEPNumber = "0352"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CSI

type CSI struct {
	// contains filtered or unexported fields
}

CSI represents a Client State Indication (XEP-0352) module type.

func New

func New(
	cfg Config,
	router router.Router,
	hosts *host.Hosts,
	hk *hook.Hooks,
	logger kitlog.Logger,
) *CSI

New returns a new initialized CSI instance.

func (*CSI) AccountFeatures

func (c *CSI) AccountFeatures(_ context.Context) ([]string, error)

AccountFeatures returns CSI account disco features.

func (*CSI) Name

func (c *CSI) Name() string

Name returns CSI module name.

func (*CSI) ServerFeatures

func (c *CSI) ServerFeatures(_ context.Context) ([]string, error)

ServerFeatures returns CSI server disco features.

func (*CSI) Start

func (c *CSI) Start(_ context.Context) error

Start starts CSI module.

func (*CSI) Stop

func (c *CSI) Stop(_ context.Context) error

Stop stops CSI module.

func (*CSI) StreamFeature

func (c *CSI) StreamFeature(_ context.Context, _ string) (stravaganza.Element, error)

StreamFeature returns CSI module stream feature.

type Config

type Config struct {
	// QueueSize defines the maximum number of buffered stanzas for inactive clients.
	QueueSize int `fig:"queue_size" default:"100"`
}

Config contains CSI module configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址