configx

package
v0.0.0-...-a5c60e6 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AMQP

func AMQP() amqpx.Configs

func Actuator

func Actuator() *actuatorx.Config

func Consul

func Consul() consulx.Configs

func Database

func Database() databasex.Configs

func ETCD

func ETCD() etcdx.Configs

func ElasticSearch

func ElasticSearch() elasticsearchx.Configs

func Gin

func Gin() *ginx.Config

func GrpcClient

func GrpcClient() grpcx.ClientConfigs

func GrpcServer

func GrpcServer() *grpcx.ServerConfig

func Kafka

func Kafka() kafkax.Configs

func Metric

func Metric() *otelx.MetricConfig

func Mongo

func Mongo() mongox.Configs

func Nacos

func Nacos() nacosx.Configs

func Redis

func Redis() redisx.Configs

func Trace

func Trace() *otelx.TraceConfig

Types

type Configuration

type Configuration struct {
	Env           *EnvConfig             `mapstructure:"env" json:"env" yaml:"env"`
	Actuator      *actuatorx.Config      `mapstructure:"actuator" json:"actuator" yaml:"actuator"`
	Nacos         nacosx.Configs         `mapstructure:"nacos" json:"nacos" yaml:"nacos"`
	Gin           *ginx.Config           `mapstructure:"gin" json:"gin" yaml:"gin"`
	GrpcServer    *grpcx.ServerConfig    `mapstructure:"grpc_server" json:"grpc_server" yaml:"grpc_server"`
	GrpcClient    grpcx.ClientConfigs    `mapstructure:"grpc_client" json:"grpc_client" yaml:"grpc_client"`
	Trace         *otelx.TraceConfig     `mapstructure:"trace" json:"trace" yaml:"trace"`
	Metric        *otelx.MetricConfig    `mapstructure:"metric" json:"metric" yaml:"metric"`
	AMQP          amqpx.Configs          `mapstructure:"amqp" json:"amqp" yaml:"amqp"`
	Kafka         kafkax.Configs         `mapstructure:"kafka" json:"kafka" yaml:"kafka"`
	Redis         redisx.Configs         `mapstructure:"redis" json:"redis" yaml:"redis"`
	Database      databasex.Configs      `mapstructure:"database" json:"database" yaml:"database"`
	Mongo         mongox.Configs         `mapstructure:"mongo" json:"mongo" yaml:"mongo"`
	ElasticSearch elasticsearchx.Configs `mapstructure:"elastic_search" json:"elastic_search" yaml:"elastic_search"`
	Consul        consulx.Configs        `mapstructure:"consul" json:"consul" yaml:"consul"`
	ETCD          etcdx.Configs          `mapstructure:"etcd" json:"etcd" yaml:"etcd"`
}
var AppConf Configuration

type EnvConfig

type EnvConfig struct {
	Name      string `mapstructure:"SERVICE_NAME" json:"SERVICE_NAME" yaml:"SERVICE_NAME"`
	Namespace string `mapstructure:"SERVICE_NAMESPACE" json:"SERVICE_NAMESPACE" yaml:"SERVICE_NAMESPACE"`
	ID        string `mapstructure:"SERVICE_ID" json:"SERVICE_ID" yaml:"SERVICE_ID"`
	Version   string `mapstructure:"SERVICE_VERSION" json:"SERVICE_VERSION" yaml:"SERVICE_VERSION"`
}

func Env

func Env() *EnvConfig

Jump to

Keyboard shortcuts

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