config

package
v0.0.0-...-8519efd Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfigYML

func ReadConfigYML(filePath string) error

ReadConfigYML - read configurations from file and init instance Config.

Types

type Config

type Config struct {
	Project   Project   `yaml:"project"`
	Grpc      Grpc      `yaml:"grpc"`
	Rest      Rest      `yaml:"rest"`
	Metrics   Metrics   `yaml:"metrics"`
	Jaeger    Jaeger    `yaml:"jaeger"`
	Status    Status    `yaml:"status"`
	Telemetry Telemetry `yaml:"telemetry"`
	GrpcDBA   GrpcDBA   `yaml:"grpc_dba"`
}

Config - contains all configuration parameters in config package.

func GetConfigInstance

func GetConfigInstance() Config

GetConfigInstance returns service config

type Grpc

type Grpc struct {
	Port              int    `yaml:"port"`
	Host              string `yaml:"host"`
	MaxConnectionIdle int64  `yaml:"maxConnectionIdle"`
	MaxConnectionAge  int64  `yaml:"maxConnectionAge"`
	Timeout           int64  `yaml:"timeout"`
}

Grpc - contains parameter address grpc.

type GrpcDBA

type GrpcDBA struct {
	Port    int    `yaml:"port"`
	Host    string `yaml:"host"`
	Timeout int64  `yaml:"timeout"`
}

type Jaeger

type Jaeger struct {
	Service string `yaml:"service"`
	Host    string `yaml:"host"`
	Port    string `yaml:"port"`
}

Jaeger - contains all parameters metrics information.

type Metrics

type Metrics struct {
	Port int    `yaml:"port"`
	Host string `yaml:"host"`
	Path string `yaml:"path"`
}

Metrics - contains all parameters metrics information.

type Project

type Project struct {
	Debug       bool   `yaml:"debug"`
	Name        string `yaml:"name"`
	ServiceName string `yaml:"serviceName"`
	Environment string `yaml:"environment"`
	Version     string
	CommitHash  string
}

Project - contains all parameters project information.

type Rest

type Rest struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
}

Rest - contains parameter rest json connection.

type Status

type Status struct {
	Port          int    `yaml:"port"`
	Host          string `yaml:"host"`
	VersionPath   string `yaml:"versionPath"`
	LivenessPath  string `yaml:"livenessPath"`
	ReadinessPath string `yaml:"readinessPath"`
}

Status config for service.

type Telemetry

type Telemetry struct {
	GraylogPath string `yaml:"graylogPath"`
}

Telemetry config for service

Jump to

Keyboard shortcuts

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