runner

package
v1.52.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: GPL-3.0 Imports: 28 Imported by: 20

Documentation

Overview

Package runner …

Index

Constants

View Source
const (
	//PlatformWindows const for windows
	PlatformWindows = "windows"
)

Variables

This section is empty.

Functions

func ParseConfigFlag added in v1.40.0

func ParseConfigFlag(f *flag.FlagSet) map[string]TomlInfo

ParseConfigFlag parse toml information for flag

Types

type Config added in v1.40.0

type Config struct {
	Root        string    `toml:"root"`
	TmpDir      string    `toml:"tmp_dir"`
	TestDataDir string    `toml:"testdata_dir"`
	Build       cfgBuild  `toml:"build"`
	Color       cfgColor  `toml:"color"`
	Log         cfgLog    `toml:"log"`
	Misc        cfgMisc   `toml:"misc"`
	Screen      cfgScreen `toml:"screen"`
	Proxy       cfgProxy  `toml:"proxy"`
}

Config is the main configuration structure for Air.

func InitConfig added in v1.40.0

func InitConfig(path string) (cfg *Config, err error)

InitConfig initializes the configuration.

func (*Config) WithArgs added in v1.40.0

func (c *Config) WithArgs(args map[string]TomlInfo)

WithArgs returns a new config with the given arguments added to the configuration.

type Engine

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

Engine ...

func NewEngine

func NewEngine(cfgPath string, debugMode bool) (*Engine, error)

NewEngine ...

func NewEngineWithConfig added in v1.40.0

func NewEngineWithConfig(cfg *Config, debugMode bool) (*Engine, error)

NewEngineWithConfig ...

func (*Engine) Run

func (e *Engine) Run()

Run run run

func (*Engine) Stop

func (e *Engine) Stop()

Stop the air

type Proxy added in v1.52.0

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

func NewProxy added in v1.52.0

func NewProxy(cfg *cfgProxy) *Proxy

func (*Proxy) Reload added in v1.52.0

func (p *Proxy) Reload()

func (*Proxy) Run added in v1.52.0

func (p *Proxy) Run()

func (*Proxy) Stop added in v1.52.0

func (p *Proxy) Stop()

type ProxyStream added in v1.52.0

type ProxyStream struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewProxyStream added in v1.52.0

func NewProxyStream() *ProxyStream

func (*ProxyStream) AddSubscriber added in v1.52.0

func (stream *ProxyStream) AddSubscriber() *Subscriber

func (*ProxyStream) Reload added in v1.52.0

func (stream *ProxyStream) Reload()

func (*ProxyStream) RemoveSubscriber added in v1.52.0

func (stream *ProxyStream) RemoveSubscriber(id int)

func (*ProxyStream) Stop added in v1.52.0

func (stream *ProxyStream) Stop()

type Reloader added in v1.52.0

type Reloader interface {
	AddSubscriber() *Subscriber
	RemoveSubscriber(id int)
	Reload()
	Stop()
}

type Subscriber added in v1.52.0

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

type TomlInfo added in v1.40.0

type TomlInfo struct {
	Value *string
	// contains filtered or unexported fields
}

TomlInfo is a struct for toml config file

Jump to

Keyboard shortcuts

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