Documentation ¶
Overview ¶
Package manager for managing pipeline scripts
Package manager for managing pipeline scripts ¶
Package manager for managing pipeline scripts ¶
Package manager for managing pipeline scripts
Index ¶
- Constants
- func CategoryDirName() map[point.Category]string
- func CopyDefalutPatterns() map[string]string
- func InitLog()
- func InitStore(manager *Manager, installDir string, tags map[string]string)
- func NSFindPriority(ns string) int
- func NewScripts(scripts, scriptTags map[string]string, ns string, cat point.Category, ...) (map[string]*PlScript, map[string]error)
- func ProcLoggingStatus(plpt ptinput.PlInputPt, disable bool, ignore []string)
- func ReadScript(fp string) (string, string, error)
- func ReadScripts(dirPath string) (map[string]string, map[string]string)
- func ReadWorkspaceScripts(basePath string) (map[point.Category](map[string]string), map[point.Category](map[string]string))
- func ScriptName(relation *ScriptRelation, cat point.Category, pt *point.Point, ...) (string, bool)
- func SearchScripts(dirPath string) (map[string]string, error)
- func SearchWorkspaceScripts(basePath string) map[point.Category](map[string]string)
- type Manager
- func (m *Manager) GetScriptRelation() *ScriptRelation
- func (m *Manager) LoadScriptWithCat(category point.Category, ns string, scripts, tags map[string]string)
- func (m *Manager) LoadScripts(ns string, scripts map[point.Category](map[string]string), ...)
- func (m *Manager) LoadScriptsFromWorkspace(ns, plPath string, tags map[string]string)
- func (m *Manager) QueryScript(category point.Category, name string, DisableDefaultP ...struct{}) (*PlScript, bool)
- func (m *Manager) ScriptCount(category point.Category) int
- func (m *Manager) UpdateDefaultScript(mp map[point.Category]string)
- type ManagerCfg
- type Option
- type PlScript
- func (script *PlScript) Category() point.Category
- func (script *PlScript) Engine() *plruntime.Script
- func (script *PlScript) NS() string
- func (script *PlScript) Name() string
- func (script *PlScript) Run(plpt ptinput.PlInputPt, signal plruntime.Signal, opt *Option) error
- func (script *PlScript) SetAggBuks(buks *plmap.AggBuckets)
- type ScriptRelation
- type ScriptStore
- func (store *ScriptStore) Count() int
- func (store *ScriptStore) GetDefaultScript() string
- func (store *ScriptStore) GetWithNs(name, ns string) (*PlScript, bool)
- func (store *ScriptStore) IndexDefault() (*PlScript, bool)
- func (store *ScriptStore) IndexGet(name string) (*PlScript, bool)
- func (store *ScriptStore) SetDefaultScript(name string)
- func (store *ScriptStore) UpdateScriptsWithNS(ns string, namedScript, scriptTags map[string]string) map[string]error
Constants ¶
View Source
const ( // pipeline关键字段. FieldTime = "time" FieldMessage = "message" FieldStatus = "status" PlLoggingSource = "source" DefaultStatus = "unknown" )
View Source
const ( NSDefault = "default" // 内置 pl script, 优先级最低 NSGitRepo = "gitrepo" // git 管理的 pl script NSConfd = "confd" // confd 管理的 pl script NSRemote = "remote" // remote pl script,优先级最高 )
Variables ¶
This section is empty.
Functions ¶
func CategoryDirName ¶
func CopyDefalutPatterns ¶
func NSFindPriority ¶
func NewScripts ¶
func ProcLoggingStatus ¶
func ReadScripts ¶ added in v1.1.21
func ReadWorkspaceScripts ¶ added in v1.1.21
func ScriptName ¶ added in v1.1.21
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(cfg ManagerCfg) *Manager
func (*Manager) GetScriptRelation ¶
func (m *Manager) GetScriptRelation() *ScriptRelation
func (*Manager) LoadScriptWithCat ¶ added in v1.1.21
func (*Manager) LoadScripts ¶ added in v1.1.21
func (m *Manager) LoadScripts(ns string, scripts map[point.Category](map[string]string), tags map[string]string, )
LoadScripts is used to load and clean the script, parameter scripts example: {point.Logging: {ScriptName: ScriptContent},... }.
func (*Manager) LoadScriptsFromWorkspace ¶ added in v1.1.21
func (*Manager) QueryScript ¶
type ManagerCfg ¶
type ManagerCfg struct {
// contains filtered or unexported fields
}
func NewManagerCfg ¶
func NewManagerCfg(upFn plmap.UploadFunc, gTags [][2]string) ManagerCfg
type PlScript ¶
type PlScript struct {
// contains filtered or unexported fields
}
func (*PlScript) SetAggBuks ¶
func (script *PlScript) SetAggBuks(buks *plmap.AggBuckets)
type ScriptRelation ¶ added in v1.1.21
type ScriptRelation struct {
// contains filtered or unexported fields
}
func NewPipelineRelation ¶ added in v1.1.21
func NewPipelineRelation() *ScriptRelation
func (*ScriptRelation) UpdateAt ¶ added in v1.1.21
func (relation *ScriptRelation) UpdateAt() int64
func (*ScriptRelation) UpdateRelation ¶ added in v1.1.21
type ScriptStore ¶
type ScriptStore struct {
// contains filtered or unexported fields
}
func NewScriptStore ¶
func NewScriptStore(category point.Category, cfg ManagerCfg) *ScriptStore
func (*ScriptStore) Count ¶
func (store *ScriptStore) Count() int
func (*ScriptStore) GetDefaultScript ¶ added in v1.1.21
func (store *ScriptStore) GetDefaultScript() string
func (*ScriptStore) GetWithNs ¶
func (store *ScriptStore) GetWithNs(name, ns string) (*PlScript, bool)
func (*ScriptStore) IndexDefault ¶ added in v1.1.21
func (store *ScriptStore) IndexDefault() (*PlScript, bool)
func (*ScriptStore) SetDefaultScript ¶ added in v1.1.21
func (store *ScriptStore) SetDefaultScript(name string)
func (*ScriptStore) UpdateScriptsWithNS ¶
Click to show internal directories.
Click to hide internal directories.