config

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

* @Author: lisheng * @Date: 2022-10-11 14:56:11 * @LastEditTime: 2023-02-07 13:35:07 * @LastEditors: lisheng * @Description: 读取配置 * @FilePath: /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
	Usingtd string `json:"usingtd"`
	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