bootstrap

package
v0.0.0-...-d35a86b Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: Apache-2.0 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
}

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
JackTT - Gopher 🇻🇳