client

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JenkinsAccessor

type JenkinsAccessor interface {
	DeleteNode(ctx context.Context, name string) (bool, error)
	GetAllNodes(ctx context.Context) (Nodes, error)
	GetNode(ctx context.Context, name string) (*gojenkins.Node, error)
}

type Nodes

type Nodes map[string]*gojenkins.Node

func (Nodes) ExcludeNode

func (n Nodes) ExcludeNode(name string) Nodes

func (Nodes) ExcludeOffline

func (n Nodes) ExcludeOffline() Nodes

func (Nodes) KeepWithLabel added in v0.2.5

func (n Nodes) KeepWithLabel(label string) Nodes

func (Nodes) Len

func (n Nodes) Len() int64

type Options

type Options struct {
	JenkinsURL     string        `config:"jenkins_url" validate:"required"`
	JenkinsUser    string        `config:"jenkins_user" validate:"required"`
	JenkinsToken   string        `config:"jenkins_token" validate:"required"`
	LastErrBackoff time.Duration `config:"last_err_backoff"`
}

func (*Options) Name

func (o *Options) Name() string

type WrapperClient

type WrapperClient struct {
	*gojenkins.Jenkins
	// contains filtered or unexported fields
}

func New

func New(opt *Options) *WrapperClient

New returns a new Client.

func (*WrapperClient) GetAllNodes

func (c *WrapperClient) GetAllNodes(ctx context.Context) (Nodes, error)

Jump to

Keyboard shortcuts

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