Documentation ¶
Index ¶
- Variables
- func DumpObject(o client.Object) string
- func GetExternalAddress(n *corev1.Node) string
- func GetNameFromKey(key string) types.NamespacedName
- func GetNamespacedName(object client.Object) types.NamespacedName
- func GetObjectKey(object client.Object) string
- func IsOwner(owner, owned metav1.Object, kind string) bool
- func IsReferenceService(ref *gwapiv1a2.BackendRef) bool
- func IsReferenceStaticService(ref *gwapiv1a2.BackendRef) bool
- func Merge(dst, src Store)
- func UnpackConfigMap(cm *corev1.ConfigMap) (stnrconfv1a1.StunnerConfig, error)
- type AuthSecretStore
- type ConfigMapStore
- type DataplaneStore
- type DeploymentStore
- type EndpointStore
- type GatewayClassStore
- type GatewayConfigStore
- type GatewayStore
- type NamespaceStore
- type NodeStore
- type SecretStore
- type ServiceStore
- type StaticServiceStore
- type Store
- type UDPRouteStore
Constants ¶
This section is empty.
Variables ¶
var AuthSecrets = NewAuthSecretStore()
var ConfigMaps = NewConfigMapStore()
var Dataplanes = NewDataplaneStore()
var Deployments = NewDeploymentStore()
var Endpoints = NewEndpointStore()
var GatewayClasses = NewGatewayClassStore()
var GatewayConfigs = NewGatewayConfigStore()
var Gateways = NewGatewayStore()
var Namespaces = NewNamespaceStore()
var Nodes = NewNodeStore()
var Secrets = NewSecretStore()
var Services = NewServiceStore()
var StaticServices = NewStaticServiceStore()
var UDPRoutes = NewUDPRouteStore()
Functions ¶
func DumpObject ¶
DumpObject convers an object into a human-readable form for logging.
func GetExternalAddress ¶
GetExternalAddress returns the first external IP or DNS address of a node
func GetNameFromKey ¶
func GetNameFromKey(key string) types.NamespacedName
FIXME this is not safe against K8s changing the namespace-name separator
func GetNamespacedName ¶
func GetNamespacedName(object client.Object) types.NamespacedName
func GetObjectKey ¶
func IsOwner ¶ added in v0.15.1
taken from redhat operator-utils: https://github.com/redhat-cop/operator-utils/blob/master/pkg/util/owner.go
func IsReferenceService ¶ added in v0.15.1
func IsReferenceService(ref *gwapiv1a2.BackendRef) bool
IsReferenceService returns true of the provided BackendRef points to a Service.
func IsReferenceStaticService ¶ added in v0.15.1
func IsReferenceStaticService(ref *gwapiv1a2.BackendRef) bool
IsReferenceStaticService returns true of the provided BackendRef points to a StaticService.
func UnpackConfigMap ¶
func UnpackConfigMap(cm *corev1.ConfigMap) (stnrconfv1a1.StunnerConfig, error)
unpacks a stunner config
Types ¶
type AuthSecretStore ¶
type AuthSecretStore struct {
Store
}
func NewAuthSecretStore ¶
func NewAuthSecretStore() *AuthSecretStore
func (*AuthSecretStore) GetAll ¶
func (s *AuthSecretStore) GetAll() []*corev1.Secret
GetAll returns all AuthSecret objects from the global storage.
func (*AuthSecretStore) GetObject ¶
func (s *AuthSecretStore) GetObject(nsName types.NamespacedName) *corev1.Secret
GetObject returns a named AuthSecret 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 DataplaneStore ¶ added in v0.15.1
type DataplaneStore struct {
Store
}
func NewDataplaneStore ¶ added in v0.15.1
func NewDataplaneStore() *DataplaneStore
func (*DataplaneStore) GetAll ¶ added in v0.15.1
func (s *DataplaneStore) GetAll() []*stunnerv1alpha1.Dataplane
GetAll returns all Dataplane objects from the global storage.
func (*DataplaneStore) GetObject ¶ added in v0.15.1
func (s *DataplaneStore) GetObject(nsName types.NamespacedName) *stunnerv1alpha1.Dataplane
GetObject returns a named Dataplane object from the global storage
type DeploymentStore ¶ added in v0.15.1
type DeploymentStore struct {
Store
}
func NewDeploymentStore ¶ added in v0.15.1
func NewDeploymentStore() *DeploymentStore
func (*DeploymentStore) GetAll ¶ added in v0.15.1
func (s *DeploymentStore) GetAll() []*appv1.Deployment
GetAll returns all Deployment objects from the global storage
func (*DeploymentStore) GetObject ¶ added in v0.15.1
func (s *DeploymentStore) GetObject(nsName types.NamespacedName) *appv1.Deployment
GetObject returns a named Deployment object from the global storage
type EndpointStore ¶
type EndpointStore struct {
Store
}
func NewEndpointStore ¶
func NewEndpointStore() *EndpointStore
func (*EndpointStore) GetAll ¶
func (s *EndpointStore) GetAll() []*corev1.Endpoints
GetAll returns all Endpoint objects from the global storage
func (*EndpointStore) GetObject ¶
func (s *EndpointStore) GetObject(nsName types.NamespacedName) *corev1.Endpoints
GetObject returns a named Endpoint object from the global storage
type GatewayClassStore ¶
type GatewayClassStore struct {
Store
}
func NewGatewayClassStore ¶
func NewGatewayClassStore() *GatewayClassStore
func (*GatewayClassStore) GetAll ¶
func (s *GatewayClassStore) GetAll() []*gatewayv1alpha2.GatewayClass
GetAll returns all GatewayClass objects from the global storage
func (*GatewayClassStore) GetObject ¶
func (s *GatewayClassStore) GetObject(nsName types.NamespacedName) *gatewayv1alpha2.GatewayClass
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() []*stunnerv1alpha1.GatewayConfig
GetAll returns all GatewayConfig objects from the global storage
func (*GatewayConfigStore) GetObject ¶
func (s *GatewayConfigStore) GetObject(nsName types.NamespacedName) *stunnerv1alpha1.GatewayConfig
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() []*gatewayv1alpha2.Gateway
GetAll returns all Gateway objects from the global storage
func (*GatewayStore) GetFirst ¶ added in v0.15.1
func (s *GatewayStore) GetFirst() *gatewayv1alpha2.Gateway
GetFirst returns the first Gateway object from the storage
func (*GatewayStore) GetObject ¶
func (s *GatewayStore) GetObject(nsName types.NamespacedName) *gatewayv1alpha2.Gateway
GetObject returns a named Gateway object from the global storage
func (*GatewayStore) ResetGateways ¶ added in v0.15.1
func (s *GatewayStore) ResetGateways(gws []*gatewayv1alpha2.Gateway)
ResetGateways resets a Gateway store from a list of Gateways.
type NamespaceStore ¶ added in v0.15.1
type NamespaceStore struct {
Store
}
func NewNamespaceStore ¶ added in v0.15.1
func NewNamespaceStore() *NamespaceStore
func (*NamespaceStore) GetAll ¶ added in v0.15.1
func (s *NamespaceStore) GetAll() []*corev1.Namespace
GetAll returns all Namespace objects from the global storage
func (*NamespaceStore) GetObject ¶ added in v0.15.1
func (s *NamespaceStore) GetObject(nsName types.NamespacedName) *corev1.Namespace
GetObject returns a named Namespace object from the global storage
type NodeStore ¶
type NodeStore struct {
Store
}
func NewNodeStore ¶
func NewNodeStore() *NodeStore
type SecretStore ¶
type SecretStore struct {
Store
}
func NewSecretStore ¶
func NewSecretStore() *SecretStore
func (*SecretStore) GetAll ¶
func (s *SecretStore) GetAll() []*corev1.Secret
GetAll returns all Secret objects from the global storage
func (*SecretStore) GetObject ¶
func (s *SecretStore) GetObject(nsName types.NamespacedName) *corev1.Secret
GetObject returns a named Secret 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 StaticServiceStore ¶ added in v0.15.1
type StaticServiceStore struct {
Store
}
func NewStaticServiceStore ¶ added in v0.15.1
func NewStaticServiceStore() *StaticServiceStore
func (*StaticServiceStore) GetAll ¶ added in v0.15.1
func (s *StaticServiceStore) GetAll() []*stnrv1a1.StaticService
GetAll returns all StaticService objects from the global storage
func (*StaticServiceStore) GetObject ¶ added in v0.15.1
func (s *StaticServiceStore) GetObject(nsName types.NamespacedName) *stnrv1a1.StaticService
GetObject returns a named StaticService object from the global storage
type Store ¶
type Store interface { // Get returns an object from the store Get(nsName types.NamespacedName) client.Object // Set resets 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 }
type UDPRouteStore ¶
type UDPRouteStore struct {
Store
}
func NewUDPRouteStore ¶
func NewUDPRouteStore() *UDPRouteStore
func (*UDPRouteStore) GetAll ¶
func (s *UDPRouteStore) GetAll() []*gatewayv1alpha2.UDPRoute
GetAll returns all UDPRoute objects from the global storage
func (*UDPRouteStore) GetObject ¶
func (s *UDPRouteStore) GetObject(nsName types.NamespacedName) *gatewayv1alpha2.UDPRoute
GetObject returns a named UDPRoute object from the global storage