app

package
v0.0.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Cfg        Config
	Registerer prometheus.Registerer

	Server *server.Server

	BookstoreServer bookstore.Server
	LibraryServer   library.Service
	ProjectServer   project.Service

	Vault *vault.Vault
}

func NewApplication

func NewApplication(cfg Config, reg prometheus.Registerer) (*Application, error)

NewApplication makes a new Application.

func (*Application) Bootstrap

func (app *Application) Bootstrap() error

Bootstrap bootstrap gRPC server and HTTP gateway

type Config

type Config struct {
	PrintConfig bool `yaml:"-"`

	Server server.Config `yaml:"server"`

	Bookstore bookstore.Config `yaml:"bookstore"`
	Library   library.Config   `yaml:"library"`
	Project   project.Config   `yaml:"project"`

	Vault vault.Config `yaml:"vault"`
}

Config is configuration for Server

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(fs *flag.FlagSet, _ log.Logger)

RegisterFlags registers flag.

func (*Config) Validate

func (c *Config) Validate(_ log.Logger) error

Validate the app config and return an error if the validation doesn't pass

Jump to

Keyboard shortcuts

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