iosnapshot

package
v1.18.0-beta10 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type History

type History interface {
	// SetApiSnapshot sets the latest Edge ApiSnapshot.
	SetApiSnapshot(latestInput *v1snap.ApiSnapshot)

	// SetKubeGatewayClient sets the client to use for Kubernetes CRUD operations when
	// Kubernetes Gateway integration is enabled. If this is not set, then it is assumed
	// that Kubernetes Gateway integration is not enabled, and no Kubernetes Gateway
	// resources will be returned from `GetInputSnapshot`.
	SetKubeGatewayClient(kubeGatewayClient client.Client)

	// GetInputSnapshot returns all resources in the Edge input snapshot, and if Kubernetes
	// Gateway integration is enabled, it additionally returns all resources on the cluster
	// with types specified by `kubeGvks`.
	GetInputSnapshot(ctx context.Context) ([]byte, error)

	// GetProxySnapshot returns the Proxies generated for all components.
	GetProxySnapshot(ctx context.Context) ([]byte, error)

	// GetXdsSnapshot returns the entire cache of xDS snapshots
	// NOTE: This contains sensitive data, as it is the exact inputs that used by Envoy
	GetXdsSnapshot(ctx context.Context) ([]byte, error)
}

History represents an object that maintains state about the running system The ControlPlane will use the Setters to update the last known state, and the Getters will be used by the Admin Server

func NewHistory

func NewHistory(cache cache.SnapshotCache, settings *gloov1.Settings, kubeGvks []schema.GroupVersionKind) History

NewHistory returns an implementation of the History interface

  • `cache` is the control plane's xDS snapshot cache
  • `settings` specifies the Settings for this control plane instance
  • `kubeGvks` specifies the list of resource types to return in the input snapshot when Kubernetes Gateway integration is enabled. For example, this may include Gateway API resources, Portal resources, or other resources specific to the Kubernetes Gateway integration. If not set, then only Edge ApiSnapshot resources will be returned from `GetInputSnapshot`.

type HistoryFactory added in v1.17.1

type HistoryFactory func(params HistoryFactoryParameters) History

HistoryFactory is a function that produces a History object

func GetHistoryFactory added in v1.17.1

func GetHistoryFactory() HistoryFactory

GetHistoryFactory returns a default HistoryFactory implementation

type HistoryFactoryParameters added in v1.17.1

type HistoryFactoryParameters struct {
	Settings *gloov1.Settings
	Cache    cache.SnapshotCache
}

HistoryFactoryParameters are the inputs used to create a History object

Jump to

Keyboard shortcuts

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