model

package
v0.0.0-...-ac43cf2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	File     string          `json:"-"`
	Rabbit   *RabbitConfig   `json:"rabbit,omitempty"`
	Database *DatabaseConfig `json:"database,omitempty"`
	Consul   *ConsulConfig   `json:"consul,omitempty"`
	Watcher  *WatcherConfig  `json:"watcher,omitempty"`
}

func LoadConfig

func LoadConfig() (*AppConfig, error)

type ConsulConfig

type ConsulConfig struct {
	Id            string `json:"id" flag:"id|1| Service tag"`
	Address       string `json:"address" flag:"consul|| Host to consul"`
	PublicAddress string `json:"publicAddress" flag:"grpc_addr|| Public grpc address with port"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Url string `json:"url" flag:"data_source|| Data source"`
}

type RabbitConfig

type RabbitConfig struct {
	Url string `json:"url" flag:"amqp|| AMQP connection"`
}

type WatcherConfig

type WatcherConfig struct {
	ExchangeName      string `json:"exchange" flag:"watcher_exchange || trigger_exchange"`
	CreateQueueName   string `json:"create_queue" flag:"create_queue || create_queue"`
	UpdateQueueName   string `json:"update_queue" flag:"update_queue || update_queue"`
	DeleteQueueName   string `json:"delete_queue" flag:"delete_queue || delete_queue"`
	AMQPUser          string `json:"amqp_user" flag:"amqp_user || AMQP user"`
	QueuesMessagesTTL string `json:"queues_messages_ttl" flag:"watcher_messages_ttl || Watcher queues messages TTL in milliseconds"`
	Enabled           bool   `json:"watch_enabled" flag:"watch_enabled || watch_enabled"`
}

Jump to

Keyboard shortcuts

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