networking

package
v1.20.4-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NamespaceDefault = "default"

Functions

func SetInstance

func SetInstance(i Ops)

SetInstance replaces the instance with the provided one. Should be used only for testing purposes.

Types

type Client

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

Client provides a wrapper for the kubernetes networking client.

func New

New builds a new networking client.

func NewForConfig

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

NewForConfig builds a new networking client for the given config.

func (*Client) CreateIngress

func (c *Client) CreateIngress(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error)

CreateIngress creates the given ingress

func (*Client) DeleteIngress

func (c *Client) DeleteIngress(name, namespace string) error

DeleteIngress deletes the given ingress

func (*Client) GetIngress

func (c *Client) GetIngress(name, namespace string) (*v1beta1.Ingress, error)

GetIngress returns the ingress given name and namespace

func (*Client) SetConfig

func (c *Client) SetConfig(cfg *rest.Config)

SetConfig sets the config and resets the client

func (*Client) UpdateIngress

func (c *Client) UpdateIngress(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error)

UpdateIngress creates the given ingress

func (*Client) ValidateIngress

func (c *Client) ValidateIngress(ingress *v1beta1.Ingress, timeout, retryInterval time.Duration) error

ValidateIngress validates the given ingress

type IngressOps

type IngressOps interface {
	// CreateIngress creates the given ingress
	CreateIngress(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error)
	// UpdateIngress creates the given ingress
	UpdateIngress(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error)
	// GetIngress returns the ingress given name and namespace
	GetIngress(name, namespace string) (*v1beta1.Ingress, error)
	// DeleteIngress deletes the given ingress
	DeleteIngress(name, namespace string) error
	// ValidateIngress validates the given ingress
	ValidateIngress(ingress *v1beta1.Ingress, timeout, retryInterval time.Duration) error
}

Ops is an interface to perform kubernetes related operations on the crd resources.

type Ops

type Ops interface {
	IngressOps

	// SetConfig sets the config and resets the client
	SetConfig(config *rest.Config)
}

Ops is an interface to perform kubernetes related operations on the networking resources.

func Instance

func Instance() Ops

Instance returns a singleton instance of the client.

func NewInstanceFromConfigFile

func NewInstanceFromConfigFile(config string) (Ops, error)

NewInstanceFromConfigFile returns new instance of client by using given config file

Jump to

Keyboard shortcuts

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