store

package
v0.0.0-...-6da7b20 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClusterRoleBindings = NewClusterRoleBindingStore()
View Source
var ClusterRoles = NewClusterRoleStore()
View Source
var ConfigMaps = NewConfigMapStore()
View Source
var Deployments = NewDeploymentStore()
View Source
var GatewayClasses = NewGatewayClassStore()
View Source
var GatewayConfigs = NewGatewayConfigStore()
View Source
var Gateways = NewGatewayStore()
View Source
var HTTPRoutes = NewHTTPRouteStore()
View Source
var Issuers = NewIssuerStore()
View Source
var LiveKitMeshes = NewLivekitMeshStore()
View Source
var Secrets = NewSecretStore()
View Source
var ServiceAccounts = NewServiceAccountStore()
View Source
var Services = NewServiceStore()
View Source
var StatefulSets = NewStatefulSetStore()
View Source
var TCPRoutes = NewTCPRouteStore()
View Source
var UDPRoutes = NewUDPRouteStore()

Functions

func DumpObject

func DumpObject(o client.Object) string

DumpObject converts an object into a human-readable form for logging.

func FetchAllObjectsBasedOnLabelFromAllStores

func FetchAllObjectsBasedOnLabelFromAllStores(lkMeshName string) []client.Object

func GetNamespacedName

func GetNamespacedName(object client.Object) types.NamespacedName

func GetObjectKey

func GetObjectKey(object client.Object) string

func Merge

func Merge(dst, src Store)

Merge merges a store with another one.

Types

type ClusterRoleBindingStore

type ClusterRoleBindingStore struct {
	Store
}

func NewClusterRoleBindingStore

func NewClusterRoleBindingStore() *ClusterRoleBindingStore

func (*ClusterRoleBindingStore) GetAll

GetAll returns all ClusterRoleBinding objects from the global storage

func (*ClusterRoleBindingStore) GetObject

GetObject returns a named ClusterRoleBinding object from the global storage

type ClusterRoleStore

type ClusterRoleStore struct {
	Store
}

func NewClusterRoleStore

func NewClusterRoleStore() *ClusterRoleStore

func (*ClusterRoleStore) GetAll

func (s *ClusterRoleStore) GetAll() []*rbacv1.ClusterRole

GetAll returns all ClusterRole objects from the global storage

func (*ClusterRoleStore) GetObject

func (s *ClusterRoleStore) GetObject(nsName types.NamespacedName) *rbacv1.ClusterRole

GetObject returns a named ClusterRole object from the global storage

type ConfigMapStore

type ConfigMapStore struct {
	Store
}

func NewConfigMapStore

func NewConfigMapStore() *ConfigMapStore

func (*ConfigMapStore) GetAll

func (s *ConfigMapStore) GetAll() []*corev1.ConfigMap

GetAll returns all ConfigMap objects from the global storage

func (*ConfigMapStore) GetObject

func (s *ConfigMapStore) GetObject(nsName types.NamespacedName) *corev1.ConfigMap

GetObject returns a named ConfigMap object from the global storage

type DeploymentStore

type DeploymentStore struct {
	Store
}

func NewDeploymentStore

func NewDeploymentStore() *DeploymentStore

func (*DeploymentStore) GetAll

func (s *DeploymentStore) GetAll() []*appv1.Deployment

GetAll returns all Deployment objects from the global storage

func (*DeploymentStore) GetObject

func (s *DeploymentStore) GetObject(nsName types.NamespacedName) *appv1.Deployment

GetObject returns a named Deployment object from the global storage

type GatewayClassStore

type GatewayClassStore struct {
	Store
}

func NewGatewayClassStore

func NewGatewayClassStore() *GatewayClassStore

func (*GatewayClassStore) GetAll

func (s *GatewayClassStore) GetAll() []*gwapiv1.GatewayClass

GetAll returns all GatewayClass objects from the global storage

func (*GatewayClassStore) GetObject

GetObject returns a named GatewayClass object from the global storage

type GatewayConfigStore

type GatewayConfigStore struct {
	Store
}

func NewGatewayConfigStore

func NewGatewayConfigStore() *GatewayConfigStore

func (*GatewayConfigStore) GetAll

func (s *GatewayConfigStore) GetAll() []*stnrgwv1.GatewayConfig

GetAll returns all GatewayConfig objects from the global storage

func (*GatewayConfigStore) GetObject

GetObject returns a named GatewayConfig object from the global storage

type GatewayStore

type GatewayStore struct {
	Store
}

func NewGatewayStore

func NewGatewayStore() *GatewayStore

func (*GatewayStore) GetAll

func (s *GatewayStore) GetAll() []*gwapiv1.Gateway

GetAll returns all Gateway objects from the global storage

func (*GatewayStore) GetObject

func (s *GatewayStore) GetObject(nsName types.NamespacedName) *gwapiv1.Gateway

GetObject returns a named Gateway object from the global storage

type HTTPRouteStore

type HTTPRouteStore struct {
	Store
}

func NewHTTPRouteStore

func NewHTTPRouteStore() *HTTPRouteStore

func (*HTTPRouteStore) GetAll

func (s *HTTPRouteStore) GetAll() []*gwapiv1.HTTPRoute

GetAll returns all HTTPRoute objects from the global storage

func (*HTTPRouteStore) GetObject

func (s *HTTPRouteStore) GetObject(nsName types.NamespacedName) *gwapiv1.HTTPRoute

GetObject returns a named HTTPRoute object from the global storage

type IssuerStore

type IssuerStore struct {
	Store
}

func NewIssuerStore

func NewIssuerStore() *IssuerStore

func (*IssuerStore) GetAll

func (s *IssuerStore) GetAll() []*cert.Issuer

GetAll returns all Issuer objects from the global storage

func (*IssuerStore) GetObject

func (s *IssuerStore) GetObject(nsName types.NamespacedName) *cert.Issuer

GetObject returns a named Issuer object from the global storage

type LiveKitMeshStore

type LiveKitMeshStore struct {
	Store
}

func NewLivekitMeshStore

func NewLivekitMeshStore() *LiveKitMeshStore

func (*LiveKitMeshStore) GetAll

func (l *LiveKitMeshStore) GetAll() []*lkstnv1a1.LiveKitMesh

type SecretStore

type SecretStore struct {
	Store
}

func NewSecretStore

func NewSecretStore() *SecretStore

func (*SecretStore) GetAll

func (s *SecretStore) GetAll() []*corev1.Secret

GetAll returns all Secrets objects from the global storage

func (*SecretStore) GetObject

func (s *SecretStore) GetObject(nsName types.NamespacedName) *corev1.Secret

GetObject returns a named Secrets object from the global storage

type ServiceAccountStore

type ServiceAccountStore struct {
	Store
}

func NewServiceAccountStore

func NewServiceAccountStore() *ServiceAccountStore

func (*ServiceAccountStore) GetAll

func (s *ServiceAccountStore) GetAll() []*corev1.ServiceAccount

GetAll returns all ServiceAccount objects from the global storage

func (*ServiceAccountStore) GetObject

GetObject returns a named ServiceAccount object from the global storage

type ServiceStore

type ServiceStore struct {
	Store
}

func NewServiceStore

func NewServiceStore() *ServiceStore

func (*ServiceStore) GetAll

func (s *ServiceStore) GetAll() []*corev1.Service

GetAll returns all Service objects from the global storage

func (*ServiceStore) GetObject

func (s *ServiceStore) GetObject(nsName types.NamespacedName) *corev1.Service

GetObject returns a named Service object from the global storage

type StatefulSetStore

type StatefulSetStore struct {
	Store
}

func NewStatefulSetStore

func NewStatefulSetStore() *StatefulSetStore

func (*StatefulSetStore) GetAll

func (s *StatefulSetStore) GetAll() []*appv1.StatefulSet

GetAll returns all Stateful objects from the global storage

func (*StatefulSetStore) GetObject

func (s *StatefulSetStore) GetObject(nsName types.NamespacedName) *appv1.StatefulSet

GetObject returns a named Stateful object from the global storage

type Store

type Store interface {
	// Get returns an object from the store
	Get(nsName types.NamespacedName) client.Object
	// Reset the store to the specified objects
	Reset(objects []client.Object)
	// UpsertIfChanged adds the resource to the store and returns true if an actual update has
	// happened
	UpsertIfChanged(object client.Object) bool
	// Upsert adds the resource to the store
	Upsert(object client.Object)
	// Remove deletes an object from the store
	Remove(nsName types.NamespacedName)
	// Len returns the number of objects in the store
	Len() int
	// Objects returns all stored objects
	Objects() []client.Object
	// Flush empties the store
	Flush()
	// String returns a string with the keys of all stored objects
	String() string
	// FetchObjectBasedOnLabel fetches all the objects from the given store based on a label
	FetchObjectBasedOnLabel(string) []client.Object
}

func NewStore

func NewStore() Store

NewStore creates a new local object storage

type TCPRouteStore

type TCPRouteStore struct {
	Store
}

func NewTCPRouteStore

func NewTCPRouteStore() *TCPRouteStore

func (*TCPRouteStore) GetAll

func (s *TCPRouteStore) GetAll() []*gwapiv1a2.TCPRoute

GetAll returns all TCPRoute objects from the global storage

func (*TCPRouteStore) GetObject

func (s *TCPRouteStore) GetObject(nsName types.NamespacedName) *gwapiv1a2.TCPRoute

GetObject returns a named TCPRoute object from the global storage

type UDPRouteStore

type UDPRouteStore struct {
	Store
}

func NewUDPRouteStore

func NewUDPRouteStore() *UDPRouteStore

func (*UDPRouteStore) GetAll

func (s *UDPRouteStore) GetAll() []*stnrgwv1.UDPRoute

GetAll returns all UDPRoute objects from the global storage

func (*UDPRouteStore) GetObject

func (s *UDPRouteStore) GetObject(nsName types.NamespacedName) *stnrgwv1.UDPRoute

GetObject returns a named UDPRoute object from the global storage

Jump to

Keyboard shortcuts

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