component

package
v0.10.2-0...-4baa321 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component interface {
	Host() string
	ProcessStanza(ctx context.Context, stanza xmpp.Stanza, stm stream.C2S)
}

Component represents a generic component interface.

type Components

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

Components represents a set of preconfigured components.

func New

func New(config *Config, discoInfo *xep0030.DiscoInfo) *Components

New returns a set of components derived from a concrete configuration.

func (*Components) Get

func (cs *Components) Get(host string) Component

Get returns a specific component associated to host name.

func (*Components) GetAll

func (cs *Components) GetAll() []Component

GetAll returns all initialized components.

func (*Components) Shutdown

func (cs *Components) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down components instance.

type Config

type Config struct {
}

Config contains all components configuration.

Jump to

Keyboard shortcuts

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