config

package
v0.0.0-...-6cf1638 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MulanPSL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Config

type Config struct {
	Server *Server `yaml:"server"`
	Etcd   *Etcd   `yaml:"etcd"`
	Kafka  *Kafka  `yaml:"kafka"`
	Es     *Es     `yaml:"es"`
	MySQL  *MySQL  `yaml:"mysql"`
	Node   *Node   `yaml:"node"`
}
var Conf *Config

type Es

type Es struct {
	Address     []string `yaml:"address"`
	MaxChanSize int      `yaml:"maxChanSize"`
	GoNum       int      `yaml:"goNum"`
	Index       Index    `yaml:"index"`
	Username    string   `yaml:"username"`
	Password    string   `yaml:"password"`
}

type Etcd

type Etcd struct {
	Endpoints []string `yaml:"endpoints"`
	Ttl       int64    `yaml:"ttl"`
}

type Index

type Index struct {
	Name       string `yaml:"name"`
	CutByApp   bool   `yaml:"cutByApp"`
	CutByMonth bool   `yaml:"cutByMonth"`
}

type Kafka

type Kafka struct {
	Brokers  []string `yaml:"brokers"`
	Topic    string   `yaml:"topic"`
	RetryNum int      `yaml:"retryNum"`
}

type MySQL

type MySQL struct {
	DriverName string `yaml:"driver"`
	Host       string `yaml:"host"`
	Port       string `yaml:"port"`
	Database   string `yaml:"database"`
	UserName   string `yaml:"username"`
	Password   string `yaml:"password"`
	Charset    string `yaml:"charset"`
}

type Node

type Node struct {
	ServerAddr string `yaml:"serverAddr"`
	ServerName string `yaml:"serverName"`
	ClientName string `yaml:"clientName"`
}

type Server

type Server struct {
	Producer string `yaml:"producer"`
	Consumer string `yaml:"consumer"`
	Host     string `yaml:"host"`
	Version  string `yaml:"version"`
}

Jump to

Keyboard shortcuts

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