agent

package
v0.15.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 14 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"`
	Build   string        `json:"build_number"`
	Started time.Time     `json:"build_started"`
	Timeout time.Duration `json:"build_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(ctx 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, build 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)

Jump to

Keyboard shortcuts

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