application

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 16 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 {
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication(
	runner func(ctx *context.WaitStopContext, t *testing.T) error,
	t *testing.T,
	opts ...Option,
) *Application

func (*Application) AddCommand

func (app *Application) AddCommand(cmd ...*cobra.Command)

func (*Application) Context

func (app *Application) Context() *context.WaitStopContext

func (*Application) Start

func (app *Application) Start()

func (*Application) WaitStop

func (app *Application) WaitStop(clearFunc func(ctx *context.WaitStopContext) error)

type Option

type Option func(app *Application)

func WithConfig

func WithConfig(conf ...any) Option

func WithConfigCenter

func WithConfigCenter(configCenterType enum.ConfigCenterType, opt any) Option

func WithInitializer

func WithInitializer(strict bool, init ...func() error) Option

func WithLogLevel

func WithLogLevel(level logrus.Level) Option

Jump to

Keyboard shortcuts

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