Documentation
¶
Overview ¶
Package bootstrap implements the functions, types, and interfaces for the module.
Index ¶
- Constants
- func LoadRemoteConfig(bootstrap *Bootstrap, v any) error
- func LoadSourceConfig(bootstrap *Bootstrap) (*configv1.SourceConfig, error)
- type Bootstrap
- func (b *Bootstrap) ID() string
- func (b *Bootstrap) Metadata() map[string]string
- func (b *Bootstrap) ServiceID() string
- func (b *Bootstrap) ServiceName() string
- func (b *Bootstrap) SetFlags(name, version string)
- func (b *Bootstrap) StartTime() time.Time
- func (b *Bootstrap) Version() string
- func (b *Bootstrap) WorkPath() string
- type Flags
Constants ¶
View Source
const ( DefaultConfigPath = "configs/config.toml" DefaultEnv = "dev" DefaultWorkDir = "." )
Constants for default paths and environment
Variables ¶
This section is empty.
Functions ¶
func LoadRemoteConfig ¶ added in v0.0.10
LoadRemoteConfig loads the config file from the given path
func LoadSourceConfig ¶
func LoadSourceConfig(bootstrap *Bootstrap) (*configv1.SourceConfig, error)
LoadSourceConfig loads the config file from the given path
Types ¶
type Bootstrap ¶
Bootstrap struct to hold bootstrap information
func DefaultBootstrap ¶
func DefaultBootstrap() *Bootstrap
DefaultBootstrap returns a default bootstrap
func (*Bootstrap) ServiceName ¶ added in v0.0.5
ServiceName returns the service name
type Flags ¶
type Flags struct { ID string Version string ServiceName string StartTime time.Time Metadata map[string]string }
Flags is a struct that holds the flags for the service
func DefaultFlags ¶
func DefaultFlags() Flags
DefaultFlags returns the default flags for the service
Click to show internal directories.
Click to hide internal directories.