s2s

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID             string
	DialTimeout    time.Duration
	ConnectTimeout time.Duration
	DialbackSecret string
	MaxStanzaSize  int
	Transport      TransportConfig
}

Config represents an s2s configuration.

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML satisfies Unmarshaler interface.

type S2S added in v0.3.4

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

S2S represents a server-to-server connection manager.

func New added in v0.3.4

func New(config *Config, mods *module.Modules, router *router.Router) *S2S

New returns a new instance of an s2s connection manager.

func (*S2S) Enabled added in v0.3.4

func (s *S2S) Enabled() bool

Enabled returns whether or not s2s sub system is enabled.

func (*S2S) GetS2SOut added in v0.3.4

func (s *S2S) GetS2SOut(localDomain, remoteDomain string) (stream.S2SOut, error)

GetS2SOut acts as an s2s outgoing stream provider.

func (*S2S) Shutdown added in v0.3.4

func (s *S2S) Shutdown(ctx context.Context)

Shutdown gracefully shuts down s2s manager.

func (*S2S) Start added in v0.3.4

func (s *S2S) Start()

Start initializes s2s manager.

type TLSConfig

type TLSConfig struct {
	CertFile    string `yaml:"cert_path"`
	PrivKeyFile string `yaml:"privkey_path"`
}

TLSConfig represents a server TLS configuration.

type TransportConfig

type TransportConfig struct {
	BindAddress string
	Port        int
	KeepAlive   time.Duration
}

TransportConfig represents s2s transport configuration.

func (*TransportConfig) UnmarshalYAML

func (c *TransportConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML satisfies Unmarshaler interface.

Jump to

Keyboard shortcuts

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