runner

package
v0.1.28939 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceClass

type ResourceClass struct {
	ID            string `json:"id"`
	ResourceClass string `json:"resource_class"`
	Description   string `json:"description"`
}

type Runner

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

func New

func New(rc *rest.Client) *Runner

func (*Runner) CreateResourceClass

func (r *Runner) CreateResourceClass(resourceClass, desc string) (rc *ResourceClass, err error)

func (*Runner) CreateToken

func (r *Runner) CreateToken(resourceClass, nickname string) (token *Token, err error)

func (*Runner) DeleteResourceClass

func (r *Runner) DeleteResourceClass(id string, force bool) error

func (*Runner) DeleteToken

func (r *Runner) DeleteToken(id string) error

func (*Runner) GetNamespaceByResourceClass added in v0.1.16508

func (r *Runner) GetNamespaceByResourceClass(resourceClass string) (ns string, err error)

func (*Runner) GetResourceClassByName added in v0.1.10458

func (r *Runner) GetResourceClassByName(resourceClass string) (rc *ResourceClass, err error)

func (*Runner) GetResourceClassesByNamespace

func (r *Runner) GetResourceClassesByNamespace(namespace string) ([]ResourceClass, error)

func (*Runner) GetRunnerInstances added in v0.1.10642

func (r *Runner) GetRunnerInstances(query string) ([]RunnerInstance, error)

func (*Runner) GetRunnerTokensByResourceClass

func (r *Runner) GetRunnerTokensByResourceClass(resourceClass string) ([]Token, error)

type RunnerInstance added in v0.1.10642

type RunnerInstance struct {
	ResourceClass  string     `json:"resource_class,omitempty"`
	Hostname       string     `json:"hostname"`
	Name           string     `json:"name"`
	FirstConnected *time.Time `json:"first_connected"`
	LastConnected  *time.Time `json:"last_connected"`
	LastUsed       *time.Time `json:"last_used"`
	IP             string     `json:"ip,omitempty"`
	Version        string     `json:"version"`
}

type Token

type Token struct {
	ID            string    `json:"id"`
	Token         string    `json:"token"`
	ResourceClass string    `json:"resource_class"`
	Nickname      string    `json:"nickname"`
	CreatedAt     time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

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