client

package
v0.0.0-...-c0421bf Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	client.Client

	Scheme *runtime.Scheme
}

Client is a wrapper for controller-runtime client

func NewClient

func NewClient(c client.Client, scheme *runtime.Scheme) (*Client, error)

NewClient returns new instance of Client

func (*Client) CreateConfigMap

func (c *Client) CreateConfigMap(ctx context.Context, cm *corev1.ConfigMap, owner metav1.Object) (*corev1.ConfigMap, error)

func (*Client) CreatePVC

func (*Client) CreatePod

func (c *Client) CreatePod(ctx context.Context, pod *corev1.Pod, owner metav1.Object) (*corev1.Pod, error)

func (*Client) CreateService

func (c *Client) CreateService(ctx context.Context, service *corev1.Service, owner metav1.Object) (*corev1.Service, error)

func (*Client) DeletePVC

func (c *Client) DeletePVC(ctx context.Context, pvc *corev1.PersistentVolumeClaim) error

DeletePVC deletes a PVC object

func (*Client) DeletePod

func (c *Client) DeletePod(ctx context.Context, pod *corev1.Pod) error

DeletePod deletes a Pod object

func (*Client) DeleteRoom

func (c *Client) DeleteRoom(ctx context.Context, room *hubv1.Room) error

DeleteRoom deletes a Room object

func (*Client) GetConfigMap

func (c *Client) GetConfigMap(ctx context.Context, key types.NamespacedName) (*corev1.ConfigMap, error)

func (*Client) GetPVC

GetPVC takes a NamespacedName key and returns a PVC object if exists

func (*Client) GetPod

func (c *Client) GetPod(ctx context.Context, key types.NamespacedName) (*corev1.Pod, error)

GetPod takes a NamespacedName key and returns a Pod object if exists

func (*Client) GetRoom

func (c *Client) GetRoom(ctx context.Context, key types.NamespacedName) (*hubv1.Room, error)

GetRoom takes a NamespacedName key and returns a Room object if exists

func (*Client) SyncConfigMap

func (c *Client) SyncConfigMap(ctx context.Context, cm *corev1.ConfigMap, owner metav1.Object) (*corev1.ConfigMap, error)

func (*Client) SyncPVC

SyncPVC takes a PVC object and updates it or creates it if not exists

func (*Client) SyncPod

func (c *Client) SyncPod(ctx context.Context, pod *corev1.Pod, owner metav1.Object) (*corev1.Pod, error)

SyncPod takes a Pod object and updates it or creates it if not exists

func (*Client) SyncRoom

func (c *Client) SyncRoom(ctx context.Context, room *hubv1.Room) (*hubv1.Room, error)

SyncRoom takes a Room object and updates it or creates it if not exists

func (*Client) SyncService

func (c *Client) SyncService(ctx context.Context, service *corev1.Service, owner metav1.Object) (*corev1.Service, error)

SyncService takes a Service object and updates it or creates it if not exists

Jump to

Keyboard shortcuts

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