runtime

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AkasaletArgsKey 环境变量的key
	AkasaletArgsKey = "AKASALET_ARGS"
)
View Source
const Root = "github.com/kanengo/akasar/Root"

Variables

This section is empty.

Functions

func CheckAkasaletArgs

func CheckAkasaletArgs(args *protos.AkasaletArgs) error

func DataDir

func DataDir() (string, error)

func LogsDir

func LogsDir() string

func NewTempDir

func NewTempDir() (string, error)

func OnExitSignal

func OnExitSignal(f func())

func ParseConfig

func ParseConfig(file string, input string, sectionValidator func(string, string) error) (*protos.AppConfig, error)

ParseConfig 解析配置 获取 app section配置, 以及缓存其他各个section配置原始数据到 app.Sections 里 后续再用 ParseConfigSection 解析对应的section配置

func ParseConfigSection

func ParseConfigSection(key, shortKey string, sections map[string]string, dst any) error

ParseConfigSection 解析某个section 配置

Types

type Bootstrap

type Bootstrap struct {
	Args *protos.AkasaletArgs
}

func GetBootstrap

func GetBootstrap(ctx context.Context) (Bootstrap, error)

func (Bootstrap) Exists

func (b Bootstrap) Exists() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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