config

package
v0.0.0-...-4c9d98c Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPath = "./configs/config.yml"

DefaultPath 默认配置路径

Functions

This section is empty.

Types

type Config

type Config struct {
	Port    string          `yaml:"port"`
	Model   string          `yaml:"model"`
	GEOIP   string          `yaml:"geoIP"`
	Log     logger.Config   `yaml:"log"`
	Elastic elastic2.Config `yaml:"elastic"`
	Kafka   kafka.Config    `yaml:"kafka"`
	Handler Handler         `yaml:"handler"`
}

Config 配置文件

var Conf *Config

Conf 全局配置文件

func NewConfig

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

NewConfig 获取配置配置

type Handler

type Handler struct {
	Topic          []string `yaml:"topic"`
	Group          string   `yaml:"group"`
	NumOfProcessor int      `yaml:"numOfProcessor"`
	Buffer         int      `yaml:"buffer"`
}

Handler handler

Jump to

Keyboard shortcuts

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