tasks

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTask

func CreateTask(args domain.CreateTaskArgs, cat *domain.TaskCategory, tags []*domain.TaskTag) (*domain.Task, error)

func FailingTaskResolveFn

func FailingTaskResolveFn(ctx context.Context, t *domain.Task, ti *domain.TaskInstance) (*domain.TaskInstance, error)

func NewFailingTask

func NewFailingTask(args domain.CreateTaskArgs, cat *domain.TaskCategory, tags []*domain.TaskTag) (*domain.Task, error)

func NewParserTask

func NewParserTask(args domain.CreateTaskArgs, cat *domain.TaskCategory, tags []*domain.TaskTag) (*domain.Task, error)

func NewRandomTask

func NewRandomTask(args domain.CreateTaskArgs, cat *domain.TaskCategory, tags []*domain.TaskTag) (*domain.Task, error)

func ParserTaskResolveFn

func ParserTaskResolveFn(ctx context.Context, t *domain.Task, ti *domain.TaskInstance) (*domain.TaskInstance, error)

func RandomTaskResolveFn

func RandomTaskResolveFn(ctx context.Context, t *domain.Task, ti *domain.TaskInstance) (*domain.TaskInstance, error)

Types

type FailingTaskArgs

type FailingTaskArgs struct {
	ItemsNumber int `json:"itemsNumber"`
	FailOnEvery int `json:"failOnEvery"`
}

func (*FailingTaskArgs) Get

func (a *FailingTaskArgs) Get(string) (interface{}, bool)

func (*FailingTaskArgs) GetFloat

func (a *FailingTaskArgs) GetFloat(s string) (float64, bool)

func (*FailingTaskArgs) GetInt

func (a *FailingTaskArgs) GetInt(s string) (int, bool)

func (*FailingTaskArgs) GetString

func (a *FailingTaskArgs) GetString(string) (string, bool)

func (*FailingTaskArgs) ToJSON

func (a *FailingTaskArgs) ToJSON() json.RawMessage

func (*FailingTaskArgs) ToMap

func (a *FailingTaskArgs) ToMap() map[string]interface{}

type ParserTaskArgs

type ParserTaskArgs struct {
	Parser  []parser.Config `json:"parser"`
	Metrics []domain.Metric `json:"metrics"`
}

func (*ParserTaskArgs) Get

func (a *ParserTaskArgs) Get(g string) (interface{}, bool)

func (*ParserTaskArgs) GetFloat

func (a *ParserTaskArgs) GetFloat(s string) (float64, bool)

func (*ParserTaskArgs) GetInt

func (a *ParserTaskArgs) GetInt(string) (int, bool)

func (*ParserTaskArgs) GetString

func (a *ParserTaskArgs) GetString(string) (string, bool)

func (*ParserTaskArgs) ToJSON

func (a *ParserTaskArgs) ToJSON() json.RawMessage

func (*ParserTaskArgs) ToMap

func (a *ParserTaskArgs) ToMap() map[string]interface{}

type RandomTaskArgs

type RandomTaskArgs struct {
	Min float64 `json:"min"`
	Max float64 `json:"max"`
}

func (*RandomTaskArgs) Get

func (a *RandomTaskArgs) Get(string) (interface{}, bool)

func (*RandomTaskArgs) GetFloat

func (a *RandomTaskArgs) GetFloat(s string) (float64, bool)

func (*RandomTaskArgs) GetInt

func (a *RandomTaskArgs) GetInt(string) (int, bool)

func (*RandomTaskArgs) GetString

func (a *RandomTaskArgs) GetString(string) (string, bool)

func (*RandomTaskArgs) ToJSON

func (a *RandomTaskArgs) ToJSON() json.RawMessage

func (*RandomTaskArgs) ToMap

func (a *RandomTaskArgs) ToMap() map[string]interface{}

Jump to

Keyboard shortcuts

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