service

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClusterIP

func CreateClusterIP(c *client.Client, s *Instance) error

CreateClusterIP creates a service using the values from the Service struct via the Client.Clientset

Args:

 Service - Service struct
 Client  - Client struct

Returns:
   error or nil

func CreateExternalName

func CreateExternalName(c *client.Client, s *Instance) error

CreateExternalName creates a service using the values from the Service struct via the Client.Clientset

Args:

 Service - Service struct
 Client  - Client struct

Returns:
   error or nil

func CreateLoadBalancer

func CreateLoadBalancer(c *client.Client, s *Instance) error

CreateLoadBalancer creates a service using the values from the Service struct via the Client.Clientset

Args:

 Service - Service struct
 Client  - Client struct

Returns:
   error or nil

func CreateNodePort

func CreateNodePort(c *client.Client, s *Instance) error

CreateNodePort creates a service using the values from the Service struct via the Client.Clientset

Args:

 Service - Service struct
 Client  - Client struct

Returns:
   error or nil

func Delete

func Delete(c *client.Client, service string, namespace string) error

Delete deletes a service

Args:

	Client - client struct from the client module
	service - Service Name
	namespace - Namespace

  Returns:
     error or nil

func Exists

func Exists(c *client.Client, service string, namespace string) (string, error)

Exists will check if the service exists or not

Args:

  • Pointer to a Client struct

Returns:

string (namespace name) OR error type

func GetIP

func GetIP(c *client.Client,
	svcName string,
	nameSpace string) (string, error)

GetIP will return the pod IP address

Args:

  • Client struct from client module
  • pod name
  • namespace

Returns:

  • the IP as string or error

Types

type Instance

type Instance struct {
	Name             string
	Namespace        string
	LabelKey         string
	LabelValue       string
	Port             int32
	PortName         string
	PortProtocol     string
	SelectorKey      string
	SelectorValue    string
	DualStackEnabled bool
	TargetPort       int
	NodePort         int32
	LoadBalancerIP   string
	ExternalName     string

	ClusterIP string
}

Instance type refers to the Service object

Jump to

Keyboard shortcuts

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