config

package
v0.0.0-...-623860c Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.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 DeviceManagementConfig

type DeviceManagementConfig struct {
	ServerAddr                string                        `yaml:"serverAddr,omitempty"`
	ServerPort                int                           `yaml:"serverPort,omitempty"`
	GinMode                   string                        `yaml:"ginMode,omitempty"`
	Mode                      util.ComponentMode            `yaml:"mode,omitempty"`
	Storage                   DeviceManagementStorageConfig `yaml:"storage,omitempty"`
	RabbitMQ                  RabbitMQConfig                `yaml:"rabbitMQ,omitempty"`
	SyncAsWholePeriod         int                           `yaml:"syncAsWholePeriod,omitempty"`
	SyncTopologyAsWholePeriod int                           `yaml:"syncTopologyAsWholePeriod,omitempty"`
	FileServer                FileServer                    `yaml:"fileServer,omitempty"`
}

func NewDeviceManagementConfig

func NewDeviceManagementConfig(o *options.Options) (*DeviceManagementConfig, error)

func (*DeviceManagementConfig) Run

func (c *DeviceManagementConfig) Run(stop <-chan struct{})

type DeviceManagementStorageConfig

type DeviceManagementStorageConfig struct {
	StorageBackend string     `yaml:"storageBackend,omitempty"`
	ORM            *ORMConfig `yaml:"ORM,omitempty"`
}

type FileServer

type FileServer struct {
	User                    string `yaml:"user"`
	Password                string `yaml:"password"`
	FileServerAddr          string `yaml:"fileServerAddr"`
	FileServerPort          string `yaml:"fileServerPort"`
	FileServerDomain        string `yaml:"fileServerDomain"`
	LogoStoragePathPrefix   string `yaml:"logoStoragePathPrefix"`
	PluginStoragePathPrefix string `yaml:"pluginStoragePathPrefix"`
}

type MySQLConfig

type MySQLConfig struct {
	Username        string `yaml:"username,omitempty"`
	Password        string `yaml:"password,omitempty"`
	Addr            string `yaml:"addr,omitempty"`
	Port            int    `yaml:"port,omitempty"`
	Database        string `yaml:"database,omitempty"`
	ConnMaxLifetime int    `yaml:"connMaxLifetime,omitempty"`
	MaxIdleConns    int    `yaml:"maxIdleConns,omitempty"`
	MaxOpenConns    int    `yaml:"maxOpenConns,omitempty"`
}

type ORMConfig

type ORMConfig struct {
	MySQL  *MySQLConfig  `yaml:"MySQL,omitempty"`
	SQLite *SQLiteConfig `yaml:"SQLite,omitempty"`
}

type RabbitMQConfig

type RabbitMQConfig struct {
	Username     string `yaml:"username,omitempty"`
	Password     string `yaml:"password,omitempty"`
	Addr         string `yaml:"addr,omitempty"`
	Port         int    `yaml:"port,omitempty"`
	Exchange     string `yaml:"exchange,omitempty"`
	ExchangeType string `yaml:"exchangeType,omitempty"`
	Reliable     bool   `yaml:"reliable,omitempty"`
	Queue        string `yaml:"queue,omitempty"`
	ConsumerTag  string `yaml:"consumerTag,omitempty"`
	ChannelLen   int    `yaml:"channelLen,omitempty"`
}

type SQLiteConfig

type SQLiteConfig struct {
	Path     string `yaml:"path,omitempty"`
	Database string `yaml:"database,omitempty"`
}

Jump to

Keyboard shortcuts

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