config

package
v0.0.0-...-9293419 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppVersion  string
	HTTP        HTTP
	GRPC        GRPC
	Logger      Logger
	Metrics     Metrics
	Jaeger      Jaeger
	Nats        Nats
	Redis       Redis
	MailService MailService
	PostgreSQL  PostgreSQL
}

Config microservice config

func ParseConfig

func ParseConfig() (*Config, error)

ParseConfig Parse config file

type GRPC

type GRPC struct {
	Port              string
	MaxConnectionIdle time.Duration
	Timeout           time.Duration
	MaxConnectionAge  time.Duration
}

GRPC gRPC service config

type HTTP

type HTTP struct {
	Port              string
	Development       bool
	Timeout           time.Duration
	ReadTimeout       time.Duration
	WriteTimeout      time.Duration
	MaxConnectionIdle time.Duration
	MaxConnectionAge  time.Duration
}

HTTP server config

type Jaeger

type Jaeger struct {
	Host        string
	ServiceName string
	LogSpans    bool
}

Jaeger config

type Logger

type Logger struct {
	DisableCaller     bool
	DisableStacktrace bool
	Encoding          string
	Level             string
}

Logger config

type MailService

type MailService struct {
	URL            string
	From           string
	Host           string
	Port           int
	Username       string
	Password       string
	KeepAlive      bool
	ConnectTimeout time.Duration
	SendTimeout    time.Duration
}

MailService config

type Metrics

type Metrics struct {
	Port        string
	URL         string
	ServiceName string
}

Metrics config

type Nats

type Nats struct {
	URL       string
	ClusterID string
	ClientID  string
}

Nats config

type PostgreSQL

type PostgreSQL struct {
	PostgresqlHost     string
	PostgresqlPort     string
	PostgresqlUser     string
	PostgresqlPassword string
	PostgresqlDBName   string
	PostgresqlSSLMode  string
	PgDriver           string
}

PostgreSQL config

type Redis

type Redis struct {
	RedisAddr      string
	RedisPassword  string
	RedisDB        string
	RedisDefaultDB string
	MinIdleConn    int
	PoolSize       int
	PoolTimeout    int
	DB             int
}

Redis config

Jump to

Keyboard shortcuts

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