config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminConfig

type AdminConfig struct {
	IP   string `yaml:"ip"`
	Port string
}

AdminConfig represents properties for admin server

type Config

type Config struct {
	Proto      string
	Users      []User
	TCP        TCPConfig
	Queue      Queue
	Db         Db
	Vhost      Vhost
	Security   Security
	Connection Connection
	Admin      AdminConfig
}

Config represents server changeable se

func CreateDefault

func CreateDefault() (*Config, error)

CreateDefault creates config from default values

func CreateFromFile

func CreateFromFile(path string) (*Config, error)

CreateFromFile creates config from file

func Default

func Default() *Config

type Connection

type Connection struct {
	ChannelsMax  uint16 `yaml:"channelsMax"`
	FrameMaxSize uint32 `yaml:"frameMaxSize"`
}

Connection settings for AMQP-connection

type Db

type Db struct {
	DefaultPath string `yaml:"defaultPath"`
	Engine      string `yaml:"engine"`
}

Db settings, such as path to load/save and engine

type Queue

type Queue struct {
	ShardSize        int    `yaml:"shardSize"`
	MaxMessagesInRAM uint64 `yaml:"maxMessagesInRam"`
}

Queue settings

type Security

type Security struct {
	PasswordCheck string `yaml:"passwordCheck"`
}

Security settings

type TCPConfig

type TCPConfig struct {
	IP           string `yaml:"ip"`
	Port         string
	Nodelay      bool
	ReadBufSize  int `yaml:"readBufSize"`
	WriteBufSize int `yaml:"writeBufSize"`
}

TCPConfig represents properties for tune network connections

type User

type User struct {
	Username string
	Password string
}

User for auth check

type Vhost

type Vhost struct {
	DefaultPath string `yaml:"defaultPath"`
}

Vhost settings

Jump to

Keyboard shortcuts

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