s2s

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetS2SOut

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

GetS2SOut returns an outgoing s2s stream given a domain pair.

func Initialize

func Initialize(cfg *Config)

Initialize initializes s2s sub system.

func Shutdown

func Shutdown()

Shutdown closes every server listener. This method should be used only for testing purposes.

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 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