jobrun

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: MIT Imports: 4 Imported by: 0

README

koron-go/jobrun

GoDoc CircleCI Go Report Card

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorParallel

type ErrorParallel struct {
	// contains filtered or unexported fields
}

ErrorParallel is set of errors which occur in parallel.

func (*ErrorParallel) As

func (e *ErrorParallel) As(v interface{}) bool

As is provided for errors.As

func (*ErrorParallel) Error

func (e *ErrorParallel) Error() string

func (*ErrorParallel) Errors

func (e *ErrorParallel) Errors() []error

Errors returns all wrapped errors in array.

func (*ErrorParallel) Is

func (e *ErrorParallel) Is(err error) bool

Is is provided for errors.Is

func (*ErrorParallel) Unwrap

func (e *ErrorParallel) Unwrap() error

Unwrap is provided for errors.Unwrap

type Parallel

type Parallel []Runner

Parallel defines parallel job runner.

func (*Parallel) Add

func (p *Parallel) Add(r ...Runner) *Parallel

Add adds a runner to Parallel.

func (Parallel) Run

func (p Parallel) Run(ctx0 context.Context) error

Run implements Runner.

type RunFunc

type RunFunc func(ctx context.Context) error

RunFunc is Runner wrapper for function.

func (RunFunc) Run

func (f RunFunc) Run(ctx context.Context) error

Run implements Runner interface.

type Runner

type Runner interface {
	Run(ctx context.Context) error
}

Runner provides job logic to run.

type Serial

type Serial []Runner

Serial defines serial job runner.

func (*Serial) Add

func (s *Serial) Add(r ...Runner) *Serial

Add adds a runner to Serial.

func (Serial) Run

func (s Serial) Run(ctx context.Context) error

Run implements Runner.

Jump to

Keyboard shortcuts

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