v1

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 20 Imported by: 9

Documentation

Overview

This package has the automatically generated typed clients.

Index

Constants

View Source
const (
	WebsocketMessageBufferSize = 10240
)

Variables

This section is empty.

Functions

func Copy

func Copy(dst *websocket.Conn, src *websocket.Conn) (int64, error)

func CopyFrom

func CopyFrom(dst io.Writer, src *websocket.Conn) (written int64, err error)

func CopyTo

func CopyTo(dst *websocket.Conn, src io.Reader) (written int64, err error)

func Dial

func Dial(address string, tlsConfig *tls.Config) (*websocket.Conn, *http.Response, error)

func NewUpgrader

func NewUpgrader() *websocket.Upgrader

func NewWebsocketStreamer

func NewWebsocketStreamer(conn *websocket.Conn, done chan struct{}) *wsStreamer

func RequestFromConfig

func RequestFromConfig(config *rest.Config, resource, name, namespace, subresource string, queryParams url.Values) (*http.Request, error)

Types

type AsyncSubresourceError

type AsyncSubresourceError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func (*AsyncSubresourceError) Error

func (a *AsyncSubresourceError) Error() string

func (*AsyncSubresourceError) GetStatusCode

func (a *AsyncSubresourceError) GetStatusCode() int

type AsyncWSRoundTripper

type AsyncWSRoundTripper struct {
	Done       chan struct{}
	Connection chan *websocket.Conn
}

func (*AsyncWSRoundTripper) WebsocketCallback

func (aws *AsyncWSRoundTripper) WebsocketCallback(ws *websocket.Conn, resp *http.Response, err error) error

type KubeVirtExpansion

type KubeVirtExpansion interface {
	PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, patchOptions metav1.PatchOptions) (*v1.KubeVirt, error)
}

type KubeVirtInterface

type KubeVirtInterface interface {
	Create(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.CreateOptions) (*v1.KubeVirt, error)
	Update(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.UpdateOptions) (*v1.KubeVirt, error)
	UpdateStatus(ctx context.Context, kubeVirt *v1.KubeVirt, opts metav1.UpdateOptions) (*v1.KubeVirt, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.KubeVirt, error)
	List(ctx context.Context, opts metav1.ListOptions) (*v1.KubeVirtList, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.KubeVirt, err error)
	KubeVirtExpansion
}

KubeVirtInterface has methods to work with KubeVirt resources.

type KubeVirtsGetter

type KubeVirtsGetter interface {
	KubeVirts(namespace string) KubeVirtInterface
}

KubeVirtsGetter has a method to return a KubeVirtInterface. A group's client should implement this interface.

type KubevirtV1Client

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

KubevirtV1Client is used to interact with features provided by the kubevirt.io group.

func New

New creates a new KubevirtV1Client for the given RESTClient.

func NewForConfig

func NewForConfig(c *rest.Config) (*KubevirtV1Client, error)

NewForConfig creates a new KubevirtV1Client for the given config.

func NewForConfigOrDie

func NewForConfigOrDie(c *rest.Config) *KubevirtV1Client

NewForConfigOrDie creates a new KubevirtV1Client for the given config and panics if there is an error in the config.

func (*KubevirtV1Client) KubeVirts

func (c *KubevirtV1Client) KubeVirts(namespace string) KubeVirtInterface

func (*KubevirtV1Client) RESTClient

func (c *KubevirtV1Client) RESTClient() rest.Interface

RESTClient returns a RESTClient that is used to communicate with API server by this client implementation.

func (*KubevirtV1Client) VirtualMachineInstanceMigrations

func (c *KubevirtV1Client) VirtualMachineInstanceMigrations(namespace string) VirtualMachineInstanceMigrationInterface

func (*KubevirtV1Client) VirtualMachineInstancePresets

func (c *KubevirtV1Client) VirtualMachineInstancePresets(namespace string) VirtualMachineInstancePresetInterface

func (*KubevirtV1Client) VirtualMachineInstanceReplicaSets

func (c *KubevirtV1Client) VirtualMachineInstanceReplicaSets(namespace string) VirtualMachineInstanceReplicaSetInterface

func (*KubevirtV1Client) VirtualMachineInstances

func (c *KubevirtV1Client) VirtualMachineInstances(namespace string) VirtualMachineInstanceInterface

func (*KubevirtV1Client) VirtualMachines

func (c *KubevirtV1Client) VirtualMachines(namespace string) VirtualMachineInterface

type RoundTripCallback

type RoundTripCallback func(conn *websocket.Conn, resp *http.Response, err error) error

type SerialConsoleOptions

type SerialConsoleOptions struct {
	ConnectionTimeout time.Duration
}

type StreamInterface

type StreamInterface interface {
	Stream(options StreamOptions) error
	AsConn() net.Conn
}

func AsyncSubresourceHelper

func AsyncSubresourceHelper(config *rest.Config, resource, namespace, name string, subresource string, queryParams url.Values) (StreamInterface, error)

params are strings with "key=value" format

type StreamOptions

type StreamOptions struct {
	In  io.Reader
	Out io.Writer
}

type VirtualMachineExpansion

type VirtualMachineExpansion interface {
	GetWithExpandedSpec(ctx context.Context, name string) (*v1.VirtualMachine, error)
	PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, patchOptions metav1.PatchOptions) (*v1.VirtualMachine, error)
	Restart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error
	ForceRestart(ctx context.Context, name string, restartOptions *v1.RestartOptions) error
	Start(ctx context.Context, name string, startOptions *v1.StartOptions) error
	Stop(ctx context.Context, name string, stopOptions *v1.StopOptions) error
	ForceStop(ctx context.Context, name string, stopOptions *v1.StopOptions) error
	Migrate(ctx context.Context, name string, migrateOptions *v1.MigrateOptions) error
	AddVolume(ctx context.Context, name string, addVolumeOptions *v1.AddVolumeOptions) error
	RemoveVolume(ctx context.Context, name string, removeVolumeOptions *v1.RemoveVolumeOptions) error
	PortForward(name string, port int, protocol string) (StreamInterface, error)
	MemoryDump(ctx context.Context, name string, memoryDumpRequest *v1.VirtualMachineMemoryDumpRequest) error
	RemoveMemoryDump(ctx context.Context, name string) error
}

type VirtualMachineInstanceExpansion

type VirtualMachineInstanceExpansion interface {
	SerialConsole(name string, options *SerialConsoleOptions) (StreamInterface, error)
	USBRedir(vmiName string) (StreamInterface, error)
	VNC(name string) (StreamInterface, error)
	Screenshot(ctx context.Context, name string, options *v1.ScreenshotOptions) ([]byte, error)
	PortForward(name string, port int, protocol string) (StreamInterface, error)
	Pause(ctx context.Context, name string, pauseOptions *v1.PauseOptions) error
	Unpause(ctx context.Context, name string, unpauseOptions *v1.UnpauseOptions) error
	Freeze(ctx context.Context, name string, unfreezeTimeout time.Duration) error
	Unfreeze(ctx context.Context, name string) error
	SoftReboot(ctx context.Context, name string) error
	GuestOsInfo(ctx context.Context, name string) (v1.VirtualMachineInstanceGuestAgentInfo, error)
	UserList(ctx context.Context, name string) (v1.VirtualMachineInstanceGuestOSUserList, error)
	FilesystemList(ctx context.Context, name string) (v1.VirtualMachineInstanceFileSystemList, error)
	AddVolume(ctx context.Context, name string, addVolumeOptions *v1.AddVolumeOptions) error
	RemoveVolume(ctx context.Context, name string, removeVolumeOptions *v1.RemoveVolumeOptions) error
	VSOCK(name string, options *v1.VSOCKOptions) (StreamInterface, error)
	SEVFetchCertChain(ctx context.Context, name string) (v1.SEVPlatformInfo, error)
	SEVQueryLaunchMeasurement(ctx context.Context, name string) (v1.SEVMeasurementInfo, error)
	SEVSetupSession(ctx context.Context, name string, sevSessionOptions *v1.SEVSessionOptions) error
	SEVInjectLaunchSecret(ctx context.Context, name string, sevSecretOptions *v1.SEVSecretOptions) error
}

type VirtualMachineInstanceInterface

type VirtualMachineInstanceInterface interface {
	Create(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.CreateOptions) (*v1.VirtualMachineInstance, error)
	Update(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.UpdateOptions) (*v1.VirtualMachineInstance, error)
	UpdateStatus(ctx context.Context, virtualMachineInstance *v1.VirtualMachineInstance, opts metav1.UpdateOptions) (*v1.VirtualMachineInstance, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualMachineInstance, error)
	List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineInstanceList, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstance, err error)
	VirtualMachineInstanceExpansion
}

VirtualMachineInstanceInterface has methods to work with VirtualMachineInstance resources.

type VirtualMachineInstanceMigrationExpansion

type VirtualMachineInstanceMigrationExpansion interface {
	PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions) (*v1.VirtualMachineInstanceMigration, error)
}

type VirtualMachineInstanceMigrationInterface

type VirtualMachineInstanceMigrationInterface interface {
	Create(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.CreateOptions) (*v1.VirtualMachineInstanceMigration, error)
	Update(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.UpdateOptions) (*v1.VirtualMachineInstanceMigration, error)
	UpdateStatus(ctx context.Context, virtualMachineInstanceMigration *v1.VirtualMachineInstanceMigration, opts metav1.UpdateOptions) (*v1.VirtualMachineInstanceMigration, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualMachineInstanceMigration, error)
	List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineInstanceMigrationList, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstanceMigration, err error)
	VirtualMachineInstanceMigrationExpansion
}

VirtualMachineInstanceMigrationInterface has methods to work with VirtualMachineInstanceMigration resources.

type VirtualMachineInstanceMigrationsGetter

type VirtualMachineInstanceMigrationsGetter interface {
	VirtualMachineInstanceMigrations(namespace string) VirtualMachineInstanceMigrationInterface
}

VirtualMachineInstanceMigrationsGetter has a method to return a VirtualMachineInstanceMigrationInterface. A group's client should implement this interface.

type VirtualMachineInstancePresetExpansion

type VirtualMachineInstancePresetExpansion interface{}

type VirtualMachineInstancePresetInterface

type VirtualMachineInstancePresetInterface interface {
	Create(ctx context.Context, virtualMachineInstancePreset *v1.VirtualMachineInstancePreset, opts metav1.CreateOptions) (*v1.VirtualMachineInstancePreset, error)
	Update(ctx context.Context, virtualMachineInstancePreset *v1.VirtualMachineInstancePreset, opts metav1.UpdateOptions) (*v1.VirtualMachineInstancePreset, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualMachineInstancePreset, error)
	List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineInstancePresetList, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstancePreset, err error)
	VirtualMachineInstancePresetExpansion
}

VirtualMachineInstancePresetInterface has methods to work with VirtualMachineInstancePreset resources.

type VirtualMachineInstancePresetsGetter

type VirtualMachineInstancePresetsGetter interface {
	VirtualMachineInstancePresets(namespace string) VirtualMachineInstancePresetInterface
}

VirtualMachineInstancePresetsGetter has a method to return a VirtualMachineInstancePresetInterface. A group's client should implement this interface.

type VirtualMachineInstanceReplicaSetExpansion

type VirtualMachineInstanceReplicaSetExpansion interface {
	GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (*autov1.Scale, error)
	UpdateScale(ctx context.Context, replicaSetName string, scale *autov1.Scale) (*autov1.Scale, error)
	PatchStatus(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions) (*v1.VirtualMachineInstanceReplicaSet, error)
}

type VirtualMachineInstanceReplicaSetInterface

type VirtualMachineInstanceReplicaSetInterface interface {
	Create(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.CreateOptions) (*v1.VirtualMachineInstanceReplicaSet, error)
	Update(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.UpdateOptions) (*v1.VirtualMachineInstanceReplicaSet, error)
	UpdateStatus(ctx context.Context, virtualMachineInstanceReplicaSet *v1.VirtualMachineInstanceReplicaSet, opts metav1.UpdateOptions) (*v1.VirtualMachineInstanceReplicaSet, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualMachineInstanceReplicaSet, error)
	List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineInstanceReplicaSetList, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachineInstanceReplicaSet, err error)
	VirtualMachineInstanceReplicaSetExpansion
}

VirtualMachineInstanceReplicaSetInterface has methods to work with VirtualMachineInstanceReplicaSet resources.

type VirtualMachineInstanceReplicaSetsGetter

type VirtualMachineInstanceReplicaSetsGetter interface {
	VirtualMachineInstanceReplicaSets(namespace string) VirtualMachineInstanceReplicaSetInterface
}

VirtualMachineInstanceReplicaSetsGetter has a method to return a VirtualMachineInstanceReplicaSetInterface. A group's client should implement this interface.

type VirtualMachineInstancesGetter

type VirtualMachineInstancesGetter interface {
	VirtualMachineInstances(namespace string) VirtualMachineInstanceInterface
}

VirtualMachineInstancesGetter has a method to return a VirtualMachineInstanceInterface. A group's client should implement this interface.

type VirtualMachineInterface

type VirtualMachineInterface interface {
	Create(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.CreateOptions) (*v1.VirtualMachine, error)
	Update(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.UpdateOptions) (*v1.VirtualMachine, error)
	UpdateStatus(ctx context.Context, virtualMachine *v1.VirtualMachine, opts metav1.UpdateOptions) (*v1.VirtualMachine, error)
	Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
	Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.VirtualMachine, error)
	List(ctx context.Context, opts metav1.ListOptions) (*v1.VirtualMachineList, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.VirtualMachine, err error)
	VirtualMachineExpansion
}

VirtualMachineInterface has methods to work with VirtualMachine resources.

type VirtualMachinesGetter

type VirtualMachinesGetter interface {
	VirtualMachines(namespace string) VirtualMachineInterface
}

VirtualMachinesGetter has a method to return a VirtualMachineInterface. A group's client should implement this interface.

type WebsocketRoundTripper

type WebsocketRoundTripper struct {
	Dialer *websocket.Dialer
	Do     RoundTripCallback
}

func (*WebsocketRoundTripper) RoundTrip

func (d *WebsocketRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

Directories

Path Synopsis
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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