v1

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Definitions for the Kubernetes types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJobClient

func NewJobClient(client client.Client) *jobClient

Types

type Clientset

type Clientset interface {
	// clienset for the batch/v1/v1 APIs
	Jobs() JobClient
}

clienset for the batch/v1 APIs

func NewClientset

func NewClientset(client client.Client) Clientset

func NewClientsetFromConfig

func NewClientsetFromConfig(cfg *rest.Config) (Clientset, error)

type JobClient

type JobClient interface {
	JobReader
	JobWriter
	JobStatusWriter
}

Client knows how to perform CRUD operations on Jobs.

type JobReader

type JobReader interface {
	// Get retrieves a Job for the given object key
	GetJob(ctx context.Context, key client.ObjectKey) (*batch_v1.Job, error)

	// List retrieves list of Jobs for a given namespace and list options.
	ListJob(ctx context.Context, opts ...client.ListOption) (*batch_v1.JobList, error)
}

Reader knows how to read and list Jobs.

type JobSlice

type JobSlice []*Job

JobSlice represents a slice of *Job

type JobStatusWriter

type JobStatusWriter interface {
	// Update updates the fields corresponding to the status subresource for the
	// given Job object.
	UpdateJobStatus(ctx context.Context, obj *batch_v1.Job, opts ...client.UpdateOption) error

	// Patch patches the given Job object's subresource.
	PatchJobStatus(ctx context.Context, obj *batch_v1.Job, patch client.Patch, opts ...client.PatchOption) error
}

StatusWriter knows how to update status subresource of a Job object.

type JobTransitionFunction

type JobTransitionFunction func(existing, desired *batch_v1.Job) error

JobTransitionFunction instructs the JobWriter how to transition between an existing Job object and a desired on an Upsert

type JobWriter

type JobWriter interface {
	// Create saves the Job object.
	CreateJob(ctx context.Context, obj *batch_v1.Job, opts ...client.CreateOption) error

	// Delete deletes the Job object.
	DeleteJob(ctx context.Context, key client.ObjectKey, opts ...client.DeleteOption) error

	// Update updates the given Job object.
	UpdateJob(ctx context.Context, obj *batch_v1.Job, opts ...client.UpdateOption) error

	// Patch patches the given Job object.
	PatchJob(ctx context.Context, obj *batch_v1.Job, patch client.Patch, opts ...client.PatchOption) error

	// DeleteAllOf deletes all Job objects matching the given options.
	DeleteAllOfJob(ctx context.Context, opts ...client.DeleteAllOfOption) error

	// Create or Update the Job object.
	UpsertJob(ctx context.Context, obj *batch_v1.Job, transitionFuncs ...JobTransitionFunction) error
}

Writer knows how to create, delete, and update Jobs.

type MulticlusterClientset

type MulticlusterClientset interface {
	// Cluster returns a Clientset for the given cluster
	Cluster(cluster string) (Clientset, error)
}

MulticlusterClientset for the batch/v1 APIs

func NewMulticlusterClientset

func NewMulticlusterClientset(client multicluster.Client) MulticlusterClientset

type MulticlusterJobClient

type MulticlusterJobClient interface {
	// Cluster returns a JobClient for the given cluster
	Cluster(cluster string) (JobClient, error)
}

Provides JobClients for multiple clusters.

func NewMulticlusterJobClient

func NewMulticlusterJobClient(client multicluster.Client) MulticlusterJobClient

Directories

Path Synopsis
Definitions for the Kubernetes Controllers
Definitions for the Kubernetes Controllers
mocks
Package mock_controller is a generated GoMock package.
Package mock_controller is a generated GoMock package.
Package mock_v1 is a generated GoMock package.
Package mock_v1 is a generated GoMock package.
mocks
Package mock_v1sets is a generated GoMock package.
Package mock_v1sets is a generated GoMock package.

Jump to

Keyboard shortcuts

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