k8sclient

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndpointAddress

type EndpointAddress struct {
	IP string `json:"ip"`
}

type EndpointSubset

type EndpointSubset struct {
	Addresses []EndpointAddress `json:"addresses"`
}

type Endpoints

type Endpoints struct {
	Metadata Metadata         `json:"metadata"`
	Subsets  []EndpointSubset `json:"subsets"`
}

type EventType

type EventType string
const (
	EventAdded    EventType = "ADDED"
	EventModified EventType = "MODIFIED"
	EventDeleted  EventType = "DELETED"
)

type K8sClient

type K8sClient interface {
	Namespace() (namespace string)
	GetEndpoints(ctx context.Context, namespace, endpointsName string) (endpoints *Endpoints, err error)
	WatchEndpoints(ctx context.Context, namespace, endpointsName, resourceVersion string, callback WatchEndpointsCallback) (err error)
}

func New

func New() (K8sClient, error)

type Metadata

type Metadata struct {
	ResourceVersion string `json:"resourceVersion"`
}

type WatchEndpointsCallback

type WatchEndpointsCallback func(eventType EventType, endpoints *Endpoints) (ok bool)

Directories

Path Synopsis
Package mock_k8sclient is a generated GoMock package.
Package mock_k8sclient is a generated GoMock package.

Jump to

Keyboard shortcuts

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