extensions

package
v1.1.0-beta3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputSnapshotFromProto

func InputSnapshotFromProto(name string, in *v1beta1.DiscoverySnapshot) input.LocalSnapshot

InputSnapshotFromProto constructs a Networking input snapshot from proto Discovery Snapshot This method is not intended to be used here, but called from implementing servers.

func InputSnapshotToProto

func InputSnapshotToProto(in input.LocalSnapshot) *v1beta1.DiscoverySnapshot

InputSnapshotToProto constructs a proto-compatible Discovery Snapshot from a networking input snapshot

func NewClientset

func NewClientset(rootCtx context.Context) *clientset

func ObjectMetaFromProto

func ObjectMetaFromProto(meta *v1beta1.ObjectMeta) metav1.ObjectMeta

ObjectMetaToProto constructs a k8s ObjectMeta from a proto-compatible version

func ObjectMetaToProto

func ObjectMetaToProto(meta metav1.ObjectMeta) *v1beta1.ObjectMeta

ObjectMetaToProto constructs a proto-compatible version of a k8s ObjectMeta

Types

type Clients

Clients provides a convenience wrapper for a set of clients to communicate with multiple Extension Servers

func NewClientsFromSettings

func NewClientsFromSettings(ctx context.Context, extensionsServerOptions []*settingsv1.GrpcServer) (Clients, error)

func (Clients) WatchPushNotifications

func (c Clients) WatchPushNotifications(ctx context.Context, pushFn PushFunc) error

WatchPushNotifications watches push notifications from the available extension servers until the context is cancelled. Will call pushFn() when a notification is received.

type Clientset

type Clientset interface {
	// ConfigureServers updates the set of servers this Clientset is configured with.
	// Restarts the notification watches if servers were updated, using the new pushFn to handle notification pushes.
	ConfigureServers(extensionsServerOptions []*settingsv1.GrpcServer, pushFn PushFunc) error

	// GetClients returns the set of Extension clients that are cached with this Clientset.
	// Must be called after UpdateServers
	GetClients() Clients
}

Clientset provides a handle to fetching a set of cached gRPC clients

type PushFunc

type PushFunc func(notification *v1beta1.PushNotification)

A PushFunc handles push notifications from an Extensions Server

Directories

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

Jump to

Keyboard shortcuts

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