app

package
v0.0.0-...-fd55db2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(ctx context.Context, cfg *Context) error

Setup is preparing the app to be started

Types

type Context

type Context struct {
	Closers []func()

	UserRepository repository.UserRepository

	UserService *app.UserService
	// contains filtered or unexported fields
}

Context is application's content

func NewContext

func NewContext(cfg *EnvConfig) *Context

NewContext instantiates new rte context object.

type EnvConfig

type EnvConfig struct {
	Port         uint   `envconfig:"PORT"               required:"false" default:"8080"`
	GrpcPort     string `envconfig:"GRPCPORT"               required:"false" default:":50051"`
	KafkaBrokers string `envconfig:"KAFKA_BOKERS"      required:"false" default:"localhost:9092"`
	KafkaTopic   string `envconfig:"KAFKA_TOPIC"      required:"false" default:"user_events"`
}

func SetupEnvConfig

func SetupEnvConfig() *EnvConfig

Jump to

Keyboard shortcuts

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