actionrunner

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	BuildPath           string            `json:"build_path"`
	OpenAPI             string            `json:"open_api"`
	Token               string            `json:"token"`
	MaxTask             int               `json:"max_task"`
	FailedTaskKeepHours int               `json:"failed_task_keep_hours"`
	Params              map[string]string `json:"params"`
	StartupCommands     []string          `json:"startup_commands"`
}

Conf .

type LogEntry

type LogEntry struct {
	Source    string            `json:"source"`
	ID        string            `json:"id"`
	Stream    string            `json:"stream"`
	Content   string            `json:"content"`
	Offset    int64             `json:"offset"`
	Timestamp int64             `json:"timestamp"`
	Tags      map[string]string `json:"tags"`
}

LogEntry .

type Logger

type Logger interface {
	Stdout() io.Writer
	Stderr() io.Writer

	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Panic(args ...interface{})
	Fatal(args ...interface{})

	Debugf(template string, args ...interface{})
	Infof(template string, args ...interface{})
	Warnf(template string, args ...interface{})
	Errorf(template string, args ...interface{})
	Panicf(template string, args ...interface{})
	Fatalf(template string, args ...interface{})
	Flush()
}

Logger .

type Runner

type Runner struct {
	Conf *Conf
	// contains filtered or unexported fields
}

Runner .

func New

func New(Conf *Conf) *Runner

New .

func (*Runner) Run

func (r *Runner) Run() error

Run .

type Task

type Task struct {
	ID          int      `json:"id"`
	JobID       string   `json:"job_id"`
	Status      string   `json:"status"`
	DownloadURL string   `json:"context_data_url"`
	Token       string   `json:"openapi_token"`
	Workdir     string   `json:"workdir"`
	Commands    []string `json:"commands"`
	Targets     []string `json:"targets"`
}

Task .

type TaskListResponse

type TaskListResponse struct {
	apistructs.Header
	Data []*Task
}

TaskListResponse .

Jump to

Keyboard shortcuts

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