autoop

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelAction

func CancelAction(w http.ResponseWriter, r *http.Request)

CancelAction Cancels a running automation operation script

func Cron

func Cron(reload bool) error

Cron Download automatic operation and maintenance scripts and start cron tasks

func CronActions

func CronActions(w http.ResponseWriter, r *http.Request)

CronActions download and load autoop script by hand

func NetdataEnv

func NetdataEnv() map[string]string

func RunAction

func RunAction(w http.ResponseWriter, r *http.Request)

RunAction Manually run an automated operation script

func StartCron

func StartCron()

Types

type Action

type Action struct {
	Path        string
	Name        string
	Md5         string
	ClusterInfo *apistructs.ClusterInfo
	Running     bool
	RunTime     time.Time
	Env         map[string]string
	CronTime    string
	Nodes       string
	Cron        *cron.Cron
	Context     context.Context
	CancelFunc  context.CancelFunc
}

Action Automation operation script related information and status

func NewAction

func NewAction(path string) *Action

NewAction Returns an Action according to the automation operation script path

func (*Action) File

func (a *Action) File(name string) string

File Returns the file name of automatic operation file

func (*Action) ReadEnv

func (a *Action) ReadEnv() error

ReadEnv Read the environment variable configuration file of the automation operation and maintenance script

func (*Action) Run

func (a *Action) Run(m map[string]string) error

Run Running tools

type LogContent

type LogContent struct {
	Source    string `json:"source"`
	ID        string `json:"id"`
	Content   string `json:"content"`
	TimeStamp int64  `json:"timestamp"`
	Stream    string `json:"stream"`
	Tags      Tag    `json:"tags"`
}

func NewLogContent

func NewLogContent() LogContent

type Tag

type Tag struct {
	Level string `json:"level"`
}

Jump to

Keyboard shortcuts

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