conf

package
v0.0.0-...-67d91c4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 6 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConf

func InitConf()

读取yaml文件 获取配置

Types

type App

type App struct {
	Name    string `yaml:"name"`
	RunType string `yaml:"runType"`
}

App app相关基础信息

type Cluster

type Cluster struct {
	Open        bool   `yaml:"open"`
	MyAddr      string `yaml:"myAddr"`
	InitCluster string `yaml:"initCluster"`
}

Cluster 集群使用 主要用于 ServiceTable

type Configs

type Configs struct {
	App        *App        `yaml:"app"`
	HttpServer *HttpServer `yaml:"httpServer"`
	GrpcServer *GrpcServer `yaml:"grpcServer"`
	GrpcClient *GrpcClient `yaml:"grpcClient"`
	TcpServer  *TcpServer  `yaml:"tcpServer"`
	TcpClient  *TcpClient  `yaml:"tcpClient"`
	UdpServer  *UdpServer  `yaml:"udpServer"`
	UdpClient  *UdpClient  `yaml:"udpClient"`
	Redis      *Redis      `yaml:"redis"`
	Mysql      []*Mysql    `yaml:"mysql"`
	MqType     string      `yaml:"mqType"`
	Nsq        *Nsq        `yaml:"nsq"`
	Rabbit     *Rabbit     `yaml:"rabbit"`
	Kafka      *Kafka      `yaml:"kafka"`
	Mongo      *Mongo      `yaml:"mongo"`
	TTF        string      `yaml:"ttf"`
	Cluster    *Cluster    `yaml:"cluster"`
	LogCentre  *LogCentre  `yaml:"logCentre"`
	Jwt        *Jwt        `yaml:"jwt"`
	Minio      *Minio      `yaml:"minio"`
}
var Arg Configs

type GrpcClient

type GrpcClient struct {
	Prod string `yaml:"prod"`
}

GrpcClient grpc客户端

type GrpcServer

type GrpcServer struct {
	Open bool   `yaml:"open"`
	Prod string `yaml:"prod"`
	Log  bool   `yaml:"log"`
}

GrpcServer grpc服务

type HttpServer

type HttpServer struct {
	Open bool   `yaml:"open"`
	Prod string `yaml:"prod"`
}

HttpServer http服务

type Jwt

type Jwt struct {
	Secret string `yaml:"secret"`
	Expire int    `yaml:"expire"`
}

Jwt jwt配置

type Kafka

type Kafka struct {
	Addr string `yaml:"addr"`
}

Kafka 消息队列kafka配置

type LogCentre

type LogCentre struct {
	Host string `yaml:"host"`
	Port int    `yaml:"prod"`
}

LogCentre 日志服务收集日志配置

type Minio

type Minio struct {
	Host   string `yaml:"host"`
	Access string `yaml:"access"`
	Secret string `yaml:"secret"`
}

Minio 对象存储 minio配置

type Mongo

type Mongo struct {
	Host     string `yaml:"host"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

Mongo mongo配置

type MqType

type MqType struct {
}

MqType 消息队列类型

type Mysql

type Mysql struct {
	DBName   string `yaml:"dbname"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Host     string `yaml:"host"`
}

Mysql mysql配置

type Nsq

type Nsq struct {
	Producer string `yaml:"producer"`
	Consumer string `yaml:"consumer"`
}

Nsq 消息队列nsq配置

type Rabbit

type Rabbit struct {
	Addr     string `yaml:"addr"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

Rabbit 消息队列rabbit配置

type Redis

type Redis struct {
	Host      string `yaml:"host"`
	Port      string `yaml:"port"`
	DB        int    `yaml:"db"`
	Password  string `yaml:"password"`
	MaxIdle   int    `yaml:"maxidle"`
	MaxActive int    `yaml:"maxactive"`
}

Redis redis配置

type TcpClient

type TcpClient struct {
	Prod string `yaml:"prod"`
}

TcpClient tcp客户端

type TcpServer

type TcpServer struct {
	Open bool   `yaml:"open"`
	Prod string `yaml:"prod"`
}

TcpServer tcp服务

type UdpClient

type UdpClient struct {
	Prod string `yaml:"prod"`
}

UdpClient udp客户端

type UdpServer

type UdpServer struct {
	Open bool   `yaml:"open"`
	Prod string `yaml:"prod"`
}

UdpServer udp服务

Jump to

Keyboard shortcuts

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