config

package
v0.0.0-...-a9f5cd1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_ENV = "local"

Variables

Functions

func GetEnvName

func GetEnvName() string

GetEnvName gets the current environment name

func NewLogger

func NewLogger() *zap.Logger

NewLogger create new zap logger

Types

type BaseContext

type BaseContext struct {
	Context context.Context
	Cancel  context.CancelFunc
}

func NewContext

func NewContext() *BaseContext

type Config

type Config struct {
	Kafka    KafkaConfig
	Server   ServerConfig
	Shutdown bool
}

Config for API

func NewConfig

func NewConfig(logger *zap.Logger) *Config

NewConfig initialize configuration

type KafkaConfig

type KafkaConfig struct {
	Endpoint string
}

KafkaConfig is a set of configuration params for kafka

type ServerConfig

type ServerConfig struct {
	Port string
}

ServerConfig is a set of configuration params for API

Jump to

Keyboard shortcuts

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