bootstrap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewApp

func NewApp(c AppConfig, servers ...transport.Server) *kratos.App

NewApp creates a new kratos app.

func NewConsulRegistrar

func NewConsulRegistrar(opts *genericoptions.ConsulOptions) registry.Registrar

func NewEtcdRegistrar

func NewEtcdRegistrar(opts *genericoptions.EtcdOptions) registry.Registrar

func NewLogger

func NewLogger(info AppInfo) krtlog.Logger

Types

type AppConfig

type AppConfig struct {
	Info      AppInfo
	Logger    krtlog.Logger
	Registrar registry.Registrar
}

The purpose of defining the AppConfig is to demonstrate the usage of wire.Struct.

type AppInfo

type AppInfo struct {
	ID       string
	Name     string
	Version  string
	Metadata map[string]string
}

func NewAppInfo

func NewAppInfo(id, name, version string) AppInfo

Jump to

Keyboard shortcuts

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