program

package
v0.1.34 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpConfig

func DumpConfig()

func MergeLocalConfig

func MergeLocalConfig(configPath string)

func ReadEnvConfig

func ReadEnvConfig(envPrefix string)

func ReadNormalConfig

func ReadNormalConfig(configFolder string)

func ReadPrivate

func ReadPrivate(privateFolder string)

Types

type Component

type Component interface {
	Start()
	Stop()
	// Get the component name
	Name() string
}

type ComponentProvider

type ComponentProvider interface {
	ProvideAllComponents() []Component
	ProvideDisabledComponents() map[string]bool
}

type ComponentService

type ComponentService struct {
	ComponentProvider ComponentProvider
	// contains filtered or unexported fields
}

func (*ComponentService) AddComponent

func (n *ComponentService) AddComponent(component Component)

func (*ComponentService) InitComponents

func (n *ComponentService) InitComponents()

func (*ComponentService) Start

func (n *ComponentService) Start()

func (*ComponentService) Stop

func (n *ComponentService) Stop()

type FolderConfig

type FolderConfig struct {
	Root    string
	Log     string
	Data    string
	Config  string
	Private string
}

func EnsureFolders

func EnsureFolders(config FolderConfig) FolderConfig

func LoadConfigs

func LoadConfigs(folderConfig FolderConfig, envPrefix string) (folderConfigActual FolderConfig)

Jump to

Keyboard shortcuts

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