configuration

package
v0.0.0-...-e5a160e Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2018 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigurationTo

func LoadConfigurationTo(configFile string, to *Config) error

Types

type Authenticator

type Authenticator struct {
	Type string `toml:"type"`
}

type Bridge

type Bridge struct {
	Address           string `toml:"address"`
	Port              int    `toml:"port"`
	CleanSession      bool   `toml:"clean_session"`
	ClientId          string `toml:"client_id"`
	KeepaliveInterval int    `toml:"keepalive_interval"`
	Connection        string `toml:"connection"`
	Type              string `toml:"type"`
}

type Config

type Config struct {
	Server Server `toml:"server"`
	Engine Engine `toml:"engine"`
	Bridge Bridge `toml:"bridge"`
}

func DefaultConfiguration

func DefaultConfiguration() *Config

func LoadConfiguration

func LoadConfiguration(configFile string) (*Config, error)

func (*Config) GetAcceptorCount

func (self *Config) GetAcceptorCount() int

func (*Config) GetAuthenticators

func (self *Config) GetAuthenticators() []Authenticator

func (*Config) GetFanoutWorkerCount

func (self *Config) GetFanoutWorkerCount() int

func (*Config) GetListenAddress

func (self *Config) GetListenAddress() string

func (*Config) GetLockPoolSize

func (self *Config) GetLockPoolSize() int

func (*Config) GetQueueSize

func (self *Config) GetQueueSize() int

func (*Config) GetSSLListenAddress

func (self *Config) GetSSLListenAddress() string

func (*Config) GetSocketAddress

func (self *Config) GetSocketAddress() string

func (*Config) GetTlsListenAddress

func (self *Config) GetTlsListenAddress() string

type Engine

type Engine struct {
	QueueSize         int             `toml:"queue_size"`
	AcceptorCount     string          `toml:"acceptor_count"`
	LockPoolSize      int             `toml:"lock_pool_size"`
	EnableSys         bool            `toml:"enable_sys"`
	FanoutWorkerCount string          `toml:"fanout_worker_count"`
	AllowAnonymous    bool            `toml:"allow_anonymous"`
	Authenticators    []Authenticator `toml:"authenticator"`
	EnablePermission  bool            `toml:"enable_permission"`
}

type Server

type Server struct {
	User                string `toml:"user"`
	LogFile             string `toml:"log_file"`
	LogLevel            string `toml:"log_level"`
	PidFile             string `toml:"pid_file"`
	BindAddress         string `toml:"bind_address"`
	Port                int    `toml:"port"`
	EnableTls           bool   `toml:"enable_tls"`
	TlsPort             int    `toml:"tls_port"`
	Keyfile             string `toml:"keyfile"`
	Cafile              string `toml:"cafile"`
	Certfile            string `toml:"certfile"`
	Socket              string `toml:"socket"`
	HttpPort            int    `toml:"http_port"`
	WebSocketMount      string `toml:"websocket_mount"`
	HttpDebug           bool   `toml:"http_debug"`
	MaxInflightMessages int    `toml:"max_inflight_messages"`
	MaxQueuedMessages   int    `toml:"max_queued_messages"`
	RetryInterval       int    `toml:"retry_interval"`
	MessageSizeLimit    int    `toml:"message_size_limit"`
}

Jump to

Keyboard shortcuts

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