agent

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	ID       string        `json:"id"`
	Repo     string        `json:"repository"`
	Pipeline string        `json:"pipeline_number"`
	Started  time.Time     `json:"pipeline_started"`
	Timeout  time.Duration `json:"pipeline_timeout"`
}

type Runner

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

func NewRunner

func NewRunner(workEngine rpc.Peer, f rpc.Filter, h string, state *State, backend *backend.Engine) Runner

func (*Runner) Run

func (r *Runner) Run(runnerCtx context.Context) error

type State

type State struct {
	sync.Mutex `json:"-"`
	Polling    int             `json:"polling_count"`
	Running    int             `json:"running_count"`
	Metadata   map[string]Info `json:"running"`
}

func (*State) Add

func (s *State) Add(id string, timeout time.Duration, repo, pipeline string)

func (*State) Done

func (s *State) Done(id string)

func (*State) Healthy

func (s *State) Healthy() bool

func (*State) WriteTo

func (s *State) WriteTo(w io.Writer) (int64, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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