actionrunner

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 20 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 {
	OrgIDs                 []int64           `json:"org_ids"`
	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"`
	UploadTimeoutSec       uint64            `json:"upload_timeout_sec"`
	PrintUploadIntervalSec uint64            `json:"print_upload_interval_sec"`
}

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