config

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

* @Author: lisheng * @Date: 2022-10-11 14:56:11 * @LastEditTime: 2022-11-20 00:12:35 * @LastEditors: lisheng * @Description: 读取配置 * @FilePath: /gitee.com/liqiyuworks/jf-go-kit/config/config.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(configPath string)

Types

type Config

type Config struct {
	flag.Options
	Log struct {
		Level string `mapstructure:"level"`
		Path  string `mapstructure:"path"`
		Name  string `mapstructure:"name"`
	} `json:"log"`
	Server struct {
		Listen string `mapstructure:"listen"`
	} `json:"server"`
	Mysql      map[string]mysql      `json:"mysql"`
	Clickhouse map[string]clickhouse `json:"clickhouse"`
	Pg         map[string]pg         `json:"pg"`
	Mongo      map[string]mongo      `json:"mongo"`
	Tdengine   map[string]tdengine   `json:"tdengine"`
	Redis      map[string]redis      `json:"redis"`
	Rabbitmq   map[string]string     `json:"rabbitmq"`
}
var C Config

func (Config) String

func (c Config) String() string

Jump to

Keyboard shortcuts

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