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 UnpackConfigMap(cm *corev1.ConfigMap) (stnrconfv1a1.StunnerConfig, error)
- type AuthSecretStore
- type ConfigMapStore
- type EndpointStore
- type GatewayClassStore
- type GatewayConfigStore
- type GatewayStore
- type NodeStore
- type SecretStore
- type ServiceStore
- type Store
- type UDPRouteStore
Constants ¶
This section is empty.
Variables ¶
var AuthSecrets = NewAuthSecretStore()
var ConfigMaps = NewConfigMapStore()
var Endpoints = NewEndpointStore()
var GatewayClasses = NewGatewayClassStore()
var GatewayConfigs = NewGatewayConfigStore()
var Gateways = NewGatewayStore()
var Nodes = NewNodeStore()
var Secrets = NewSecretStore()
var Services = NewServiceStore()
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 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 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) GetObject ¶
func (s *GatewayStore) GetObject(nsName types.NamespacedName) *gatewayv1alpha2.Gateway
GetObject returns a named Gateway 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 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