app

package
v0.0.0-...-a9bd8d8 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

go generate build

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgsProcess

func ArgsProcess(ctx *plugin.Context, getInfo func() *Info) bool

ArgsProcess 插件收到的标准参数: 原参数:/User/harder/bups --plugin daemon --args '<--s start>' 插件看到的:/User/harder/bups --s start 有处理参数则返回true,没有处理与调度器无关的程序则返回false

func LoaderPlugin

func LoaderPlugin(path string) *plugin.Context

LoaderPlugin 根据目录加载目录下的所有插件 并为Context初始化原始资源

func MainAppArgsToPlugin

func MainAppArgsToPlugin(s string) []string

MainAppArgsToPlugin 该函数将主程序参数转换为插件参数

func NewCFGBuffer

func NewCFGBuffer(fd *os.File) io.ReadWriteCloser

func PluginRegister

func PluginRegister()

func RegisterSource

func RegisterSource(configPath string)

RegisterSource 负责将所有用到的资源装载进iocc中

Types

type CFG

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

CFG 解决配置文件缓冲读的问题

func (*CFG) Close

func (c *CFG) Close() error

func (*CFG) Open

func (c *CFG) Open(fd *os.File)

func (*CFG) Read

func (c *CFG) Read(p []byte) (n int, err error)

兼容io.Reader

func (*CFG) Update

func (c *CFG) Update(fd *os.File)

func (*CFG) Write

func (c *CFG) Write(p []byte) (n int, err error)

type Info

type Info struct {
	Version      string `json:"version"`
	GitBranch    string `json:"gitBranch"`
	GitCommit    string `json:"gitCommit"`
	GitTreeState string `json:"gitTreeState"`
	BuildDate    string `json:"buildDate"`
	GoVersion    string `json:"goVersion"`
	Compiler     string `json:"compiler"`
	Platform     string `json:"platform"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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