k8s

package
v0.0.0-...-d7aa70f Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEndpointToJob

func AddEndpointToJob(j *batchv1.Job, endpoint string)

func AddUIDToJob

func AddUIDToJob(j *batchv1.Job, uid uuid.UUID)

func DeleteJob

func DeleteJob(
	ctx context.Context,
	cl JobDeleter,
	uid uuid.UUID,
) error

func GetEndpointFromJob

func GetEndpointFromJob(j *batchv1.Job) (string, error)

func GetUIDFromJob

func GetUIDFromJob(j *batchv1.Job) (uuid.UUID, error)

func NewClient

func NewClient(inCluster bool) (*kubernetes.Clientset, error)

func NewJob

func NewJob(
	uid uuid.UUID,
	endpoint string,
	numPods,
	numRequests,
	numConcurrent uint,
	headers []string,
) *batchv1.Job

Types

type ConfigType

type ConfigType string
const (
	ConfigTypeInCluster ConfigType = "in-cluster"
	ConfigTypeLocalhost ConfigType = "localhost"
)

type JobDeleter

type JobDeleter interface {
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
}

type JobLister

type JobLister interface {
	List(ctx context.Context, opts metav1.ListOptions) (*batchv1.JobList, error)
}

Jump to

Keyboard shortcuts

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