worker

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

func RunWorker

func RunWorker(jobs string, concurrency int) (string, error)

func RunWorkerCommand

func RunWorkerCommand(args *Args)

func SetupRootCommand

func SetupRootCommand() *cobra.Command

Types

type Args

type Args struct {
	//Verbosity string
	Jobs        string
	Concurrency int
}

type Batch

type Batch struct {
	Namespace string
	Pod       string
	Container string
	Requests  []*Request
}

func (*Batch) IsValid

func (b *Batch) IsValid() error

func (*Batch) Key

func (b *Batch) Key() string

type Client

type Client struct {
	Kubernetes kube.IKubernetes
}

func (*Client) Batch

func (c *Client) Batch(b *Batch) ([]*Result, error)

type Request

type Request struct {
	Key      string
	Protocol v1.Protocol
	Host     string
	Port     int
}

func (*Request) Address

func (r *Request) Address() string

func (*Request) Command

func (r *Request) Command() []string

type Result

type Result struct {
	Request *Request
	Output  string
	Error   string
}

func IssueBatch

func IssueBatch(batch *Batch, concurrency int) []*Result

func IssueRequest

func IssueRequest(r *Request) *Result

func IssueRequestWithRetries

func IssueRequestWithRetries(r *Request, retries int) *Result

func (*Result) IsSuccess

func (r *Result) IsSuccess() bool

Jump to

Keyboard shortcuts

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