application

package
v0.0.0-...-d8b0a59 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
}

Application is the NCP composition root and component lifecycle owner.

func New

func New(options ...Option) (*Application, error)

func (*Application) Component

func (app *Application) Component(name string) (component.ComponentInfo, bool)

func (*Application) Components

func (app *Application) Components() []component.ComponentInfo

func (*Application) ExecuteContext

func (app *Application) ExecuteContext(ctx context.Context) error

func (*Application) Exit

func (app *Application) Exit()

func (*Application) GetCertPath

func (app *Application) GetCertPath() string

func (*Application) GetConfigFile

func (app *Application) GetConfigFile() string

func (*Application) GetContext

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

func (*Application) GetLogger

func (app *Application) GetLogger() *zap.Logger

func (*Application) GetRemoterWorkDir

func (app *Application) GetRemoterWorkDir() string

func (*Application) GetWorkDir

func (app *Application) GetWorkDir() string

func (*Application) Register

func (app *Application) Register(components ...component.Component) error

Register adds components to the composition root. Constructors are expected to be side-effect free; commands and services are discovered explicitly here.

func (*Application) Resolve

func (app *Application) Resolve(name string) (any, bool)

func (*Application) RootCommand

func (app *Application) RootCommand() *cobra.Command

func (*Application) Submit

func (app *Application) Submit(task func()) error

type Config

type Config struct {
	// contains filtered or unexported fields
}

type Option

type Option func(*Application)

func WithCertPath

func WithCertPath(path string) Option

func WithConfigFile

func WithConfigFile(path string) Option

func WithGoPs

func WithGoPs(enabled bool) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithPoolSize

func WithPoolSize(size int) Option

func WithPyroscope

func WithPyroscope(enabled bool) Option

func WithRemoteWorkDir

func WithRemoteWorkDir(path string) Option

func WithWorkDir

func WithWorkDir(path string) Option

Jump to

Keyboard shortcuts

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