runtime

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	NonOptionArgs = "nonOptionArgs"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Run(args ...string) error
	Exit() int
}

type Arguments

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

func ParseArguments

func ParseArguments(args []string) (*Arguments, error)

func (*Arguments) ContainsOption

func (a *Arguments) ContainsOption(name string) bool

func (*Arguments) NonOptionArgs

func (a *Arguments) NonOptionArgs() []string

func (*Arguments) OptionNames

func (a *Arguments) OptionNames() []string

func (*Arguments) OptionValues

func (a *Arguments) OptionValues(name string) []string

type ArgumentsSource

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

func NewArgumentsSource

func NewArgumentsSource(args *Arguments) *ArgumentsSource

func (*ArgumentsSource) ContainsProperty

func (s *ArgumentsSource) ContainsProperty(name string) bool

func (*ArgumentsSource) Name

func (s *ArgumentsSource) Name() string

func (*ArgumentsSource) NonOptionArgs

func (s *ArgumentsSource) NonOptionArgs() []string

func (*ArgumentsSource) OptionValues

func (s *ArgumentsSource) OptionValues(name string) []string

func (*ArgumentsSource) Property

func (s *ArgumentsSource) Property(name string) (any, bool)

func (*ArgumentsSource) PropertyNames

func (s *ArgumentsSource) PropertyNames() []string

func (*ArgumentsSource) PropertyOrDefault

func (s *ArgumentsSource) PropertyOrDefault(name string, defaultValue any) any

func (*ArgumentsSource) Source

func (s *ArgumentsSource) Source() any
type Banner interface {
	PrintBanner(writer io.Writer) error
}

type Context

type Context interface {
	context.Context

	Environment() Environment
	Container() component.Container
}

type ContextConfigurer

type ContextConfigurer interface {
	ConfigureContext(ctx Context) error
}

type DefaultEnvironment

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

func NewDefaultEnvironment

func NewDefaultEnvironment() *DefaultEnvironment

func (*DefaultEnvironment) ActiveProfiles

func (e *DefaultEnvironment) ActiveProfiles() []string

func (*DefaultEnvironment) AddActiveProfile

func (e *DefaultEnvironment) AddActiveProfile(profiles ...string) error

func (*DefaultEnvironment) DefaultProfiles

func (e *DefaultEnvironment) DefaultProfiles() []string

func (*DefaultEnvironment) IsProfileActive

func (e *DefaultEnvironment) IsProfileActive(profile string) bool

func (*DefaultEnvironment) Merge

func (e *DefaultEnvironment) Merge(parent Environment)

func (*DefaultEnvironment) PropertyResolver

func (e *DefaultEnvironment) PropertyResolver() property.Resolver

func (*DefaultEnvironment) PropertySources

func (e *DefaultEnvironment) PropertySources() *property.Sources

func (*DefaultEnvironment) SetActiveProfiles

func (e *DefaultEnvironment) SetActiveProfiles(profiles ...string) error

func (*DefaultEnvironment) SetDefaultProfiles

func (e *DefaultEnvironment) SetDefaultProfiles(profiles ...string) error

type Environment

type Environment interface {
	ActiveProfiles() []string
	DefaultProfiles() []string
	IsProfileActive(profile string) bool

	SetActiveProfiles(profiles ...string) error
	AddActiveProfile(profile ...string) error
	SetDefaultProfiles(profiles ...string) error
	Merge(parent Environment)

	PropertySources() *property.Sources
	PropertyResolver() property.Resolver
}

type EnvironmentConfigurer

type EnvironmentConfigurer interface {
	ConfigureEnvironment(ctx context.Context, environment Environment) error
}

type EnvironmentSource

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

func NewEnvironmentSource

func NewEnvironmentSource() *EnvironmentSource

func (*EnvironmentSource) ContainsProperty

func (s *EnvironmentSource) ContainsProperty(name string) bool

func (*EnvironmentSource) Name

func (s *EnvironmentSource) Name() string

func (*EnvironmentSource) Property

func (s *EnvironmentSource) Property(name string) (any, bool)

func (*EnvironmentSource) PropertyNames

func (s *EnvironmentSource) PropertyNames() []string

func (*EnvironmentSource) PropertyOrDefault

func (s *EnvironmentSource) PropertyOrDefault(name string, defaultValue any) any

func (*EnvironmentSource) Source

func (s *EnvironmentSource) Source() any

type EventMulticaster

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

func NewEventMulticaster

func NewEventMulticaster() *EventMulticaster

func (*EventMulticaster) AddListener

func (m *EventMulticaster) AddListener(eventListener event.Listener) error

func (*EventMulticaster) MulticastEvent

func (m *EventMulticaster) MulticastEvent(ctx context.Context, event event.Event) error

func (*EventMulticaster) RemoveAllListeners

func (m *EventMulticaster) RemoveAllListeners()

func (*EventMulticaster) RemoveListener

func (m *EventMulticaster) RemoveListener(eventListener event.Listener) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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