Documentation ¶
Index ¶
- Variables
- type ClusterStore
- func GetAcceptedIngressStore() *ClusterStore
- func GetAcceptedLBSvcStore() *ClusterStore
- func GetAcceptedMultiClusterIngressStore() *ClusterStore
- func GetAcceptedRouteStore() *ClusterStore
- func GetHostRuleStore() *ClusterStore
- func GetRejectedIngressStore() *ClusterStore
- func GetRejectedLBSvcStore() *ClusterStore
- func GetRejectedMultiClusterIngressStore() *ClusterStore
- func GetRejectedRouteStore() *ClusterStore
- func NewClusterStore() *ClusterStore
- func (clusterStore *ClusterStore) AddOrUpdate(obj interface{}, cname, ns, objName string)
- func (clusterStore *ClusterStore) DeleteClusterNSObj(cname, ns, objName string) (interface{}, bool)
- func (clusterStore *ClusterStore) DeleteClusterStore(cname string) bool
- func (clusterStore *ClusterStore) GetAllClusterNSObjects() []string
- func (clusterStore *ClusterStore) GetAllClusters() []string
- func (clusterStore *ClusterStore) GetAllFilteredClusterNSObjects(applyFilter Filterfn) ([]string, []string)
- func (clusterStore *ClusterStore) GetAllFilteredObjectsForClusterFqdn(applyFilter Filterfn, cluster string, gfqdn string) ([]string, []string)
- func (clusterStore *ClusterStore) GetClusterNSObjectByName(cname, ns, objName string) (interface{}, bool)
- func (clusterStore *ClusterStore) GetClusterStore(cname string) *ObjectStore
- type Filterfn
- type ObjectMapStore
- func (o *ObjectMapStore) AddOrUpdate(objName string, obj interface{})
- func (o *ObjectMapStore) Delete(objName string) (interface{}, bool)
- func (o *ObjectMapStore) Get(objName string) (bool, interface{})
- func (o *ObjectMapStore) GetAllFilteredObjects(applyFilter Filterfn, cname string) ([]string, []string)
- func (o *ObjectMapStore) GetAllFilteredObjectsForFqdn(applyFilter Filterfn, cname string, fqdn string) ([]string, []string)
- func (o *ObjectMapStore) GetAllObjectNames() []string
- type ObjectStore
- func (store *ObjectStore) AddOrUpdate(key, objName string, obj interface{})
- func (store *ObjectStore) DeleteNSObj(ns, objName string) (interface{}, bool)
- func (store *ObjectStore) DeleteNSStore(nsName string) bool
- func (store *ObjectStore) GetAllFilteredNSObjects(applyFilter Filterfn, cname string) ([]string, []string)
- func (store *ObjectStore) GetAllFilteredNSObjectsForFqdn(applyFilter Filterfn, cname string, fqdn string) ([]string, []string)
- func (store *ObjectStore) GetAllFilteredNamespaces(applyFilter Filterfn) ([]string, []string)
- func (store *ObjectStore) GetAllNSObjects() []string
- func (store *ObjectStore) GetAllNamespaces() []string
- func (store *ObjectStore) GetNSObjectByName(ns, objName string) (interface{}, bool)
- func (store *ObjectStore) GetNSStore(nsName string) *ObjectMapStore
Constants ¶
This section is empty.
Variables ¶
var ( AcceptedRouteStore *ClusterStore RejectedRouteStore *ClusterStore AcceptedLBSvcStore *ClusterStore RejectedLBSvcStore *ClusterStore AcceptedIngressStore *ClusterStore RejectedIngressStore *ClusterStore AcceptedNSStore *ObjectStore RejectedNSStore *ObjectStore HostRuleStore *ClusterStore AcceptedMultiClusterIngressStore *ClusterStore RejectedMultiClusterIngressStore *ClusterStore )
Cluster Routes store for all the route objects.
Functions ¶
This section is empty.
Types ¶
type ClusterStore ¶
type ClusterStore struct { ClusterObjectMap map[string]*ObjectStore ClusterLock sync.RWMutex }
func GetAcceptedIngressStore ¶
func GetAcceptedIngressStore() *ClusterStore
GetAcceptedIngressStore initializes and returns a new accepted ingress store.
func GetAcceptedLBSvcStore ¶
func GetAcceptedLBSvcStore() *ClusterStore
GetAcceptedLBSvcStore initializes and returns a new accepted route store.
func GetAcceptedMultiClusterIngressStore ¶
func GetAcceptedMultiClusterIngressStore() *ClusterStore
GetAcceptedIngressStore initializes and returns a new accepted multi-cluster ingress store.
func GetAcceptedRouteStore ¶
func GetAcceptedRouteStore() *ClusterStore
GetAcceptedRouteStore initializes and returns a new accepted route store.
func GetHostRuleStore ¶
func GetHostRuleStore() *ClusterStore
GetHostRuleStore initializes and returns an initialized HostRule Store
func GetRejectedIngressStore ¶
func GetRejectedIngressStore() *ClusterStore
GetRejectedIngressStore initializes and returns a new accepted ingress store.
func GetRejectedLBSvcStore ¶
func GetRejectedLBSvcStore() *ClusterStore
GetRejectedLBSvcStore initializes and returns a new accepted route store.
func GetRejectedMultiClusterIngressStore ¶
func GetRejectedMultiClusterIngressStore() *ClusterStore
GetRejectedMultiClusterIngressStore initializes and returns a new rejected multi-cluster ingress store.
func GetRejectedRouteStore ¶
func GetRejectedRouteStore() *ClusterStore
GetRejectedRouteStore initializes and returns a new accepted route store.
func NewClusterStore ¶
func NewClusterStore() *ClusterStore
NewClusterStore initializes and returns a new cluster store.
func (*ClusterStore) AddOrUpdate ¶
func (clusterStore *ClusterStore) AddOrUpdate(obj interface{}, cname, ns, objName string)
AddOrUpdate fetches the right cluster store and then updates the object inside the namespace store inside the cluster store.
func (*ClusterStore) DeleteClusterNSObj ¶
func (clusterStore *ClusterStore) DeleteClusterNSObj(cname, ns, objName string) (interface{}, bool)
DeleteClusterNSObj deletes the object from the object map in namespace store in the cluster store. It also checks if the cluster is empty and not required anymore and removes it.
func (*ClusterStore) DeleteClusterStore ¶
func (clusterStore *ClusterStore) DeleteClusterStore(cname string) bool
DeleteClusterStore deletes the key for a cluster which means it also deletes the entire cluster related objects. Use with care.
func (*ClusterStore) GetAllClusterNSObjects ¶
func (clusterStore *ClusterStore) GetAllClusterNSObjects() []string
func (*ClusterStore) GetAllClusters ¶
func (clusterStore *ClusterStore) GetAllClusters() []string
GetAllClusters returns the list of all clusters in clusterStore.
func (*ClusterStore) GetAllFilteredClusterNSObjects ¶
func (clusterStore *ClusterStore) GetAllFilteredClusterNSObjects(applyFilter Filterfn) ([]string, []string)
GetAllFilteredClusterNSObjects gets the list of all accepted and rejected objects which pass the filter function applyFilter.
func (*ClusterStore) GetAllFilteredObjectsForClusterFqdn ¶
func (clusterStore *ClusterStore) GetAllFilteredObjectsForClusterFqdn(applyFilter Filterfn, cluster string, gfqdn string) ([]string, []string)
GetAllFilteredClusterNSObjectsForCluster gets the list of all accepted and rejected objects which pass the filter function applyFilter for a specified cluster.
func (*ClusterStore) GetClusterNSObjectByName ¶
func (clusterStore *ClusterStore) GetClusterNSObjectByName(cname, ns, objName string) (interface{}, bool)
GetClusterNSObjectByName returns the object objName by looking into the ns Object map.
func (*ClusterStore) GetClusterStore ¶
func (clusterStore *ClusterStore) GetClusterStore(cname string) *ObjectStore
GetClusterStore fetches the the cluster object map if it exists, if not, initializes a new one and returns that.
type Filterfn ¶
type Filterfn func(filter.FilterArgs) bool
Filterfn is a type of a function used to filter out objects.
type ObjectMapStore ¶
ObjectMapStore contains an ObjectMap and a lock.
func NewObjectMapStore ¶
func NewObjectMapStore() *ObjectMapStore
NewObjectMapStore initializes and returns a new ObjectMapStore.
func (*ObjectMapStore) AddOrUpdate ¶
func (o *ObjectMapStore) AddOrUpdate(objName string, obj interface{})
AddOrUpdate adds or updates the object objName in object map store.
func (*ObjectMapStore) Delete ¶
func (o *ObjectMapStore) Delete(objName string) (interface{}, bool)
Delete deletes the key and the value from the map store and returns that object along with whether that element existed or not.
func (*ObjectMapStore) Get ¶
func (o *ObjectMapStore) Get(objName string) (bool, interface{})
Get returns the object with name "objName" in the object map store.
func (*ObjectMapStore) GetAllFilteredObjects ¶
func (o *ObjectMapStore) GetAllFilteredObjects(applyFilter Filterfn, cname string) ([]string, []string)
GetAllFilteredObjects returns a list of all the objects which pass the filter function "applyFilter".
func (*ObjectMapStore) GetAllFilteredObjectsForFqdn ¶
func (*ObjectMapStore) GetAllObjectNames ¶
func (o *ObjectMapStore) GetAllObjectNames() []string
GetAllObjectNames returns the object map of all the objects in ObjectMapStore.
type ObjectStore ¶
type ObjectStore struct { NSObjectMap map[string]*ObjectMapStore NSLock sync.RWMutex }
ObjectStore consists of a map of string and ObjectMapStore and a lock.
func GetAcceptedNSStore ¶
func GetAcceptedNSStore() *ObjectStore
GetAcceptedNSStore initializes and returns a new accepted NSStore.
func GetRejectedNSStore ¶
func GetRejectedNSStore() *ObjectStore
GetRejectedNSStore initializes and returns a new accepted NSStore.
func NewObjectStore ¶
func NewObjectStore() *ObjectStore
NewObjectStore initilizes a new ObjectStore and returns the address for it.
func (*ObjectStore) AddOrUpdate ¶
func (store *ObjectStore) AddOrUpdate(key, objName string, obj interface{})
AddOrUpdate fetches the right NS Store and then updates the object map store.
func (*ObjectStore) DeleteNSObj ¶
func (store *ObjectStore) DeleteNSObj(ns, objName string) (interface{}, bool)
DeleteNSObj deletes the obj from the object map store. Checks if that was the last element in this namespace, if yes, it also removes the namespace.
func (*ObjectStore) DeleteNSStore ¶
func (store *ObjectStore) DeleteNSStore(nsName string) bool
DeleteNSStore deletes the object map store for the namespace nsName.
func (*ObjectStore) GetAllFilteredNSObjects ¶
func (store *ObjectStore) GetAllFilteredNSObjects(applyFilter Filterfn, cname string) ([]string, []string)
GetAllFilteredNSObjects fetches all the objects from Object Map Store and prefixes the namespace to it.
func (*ObjectStore) GetAllFilteredNSObjectsForFqdn ¶
func (*ObjectStore) GetAllFilteredNamespaces ¶
func (store *ObjectStore) GetAllFilteredNamespaces(applyFilter Filterfn) ([]string, []string)
func (*ObjectStore) GetAllNSObjects ¶
func (store *ObjectStore) GetAllNSObjects() []string
func (*ObjectStore) GetAllNamespaces ¶
func (store *ObjectStore) GetAllNamespaces() []string
GetAllNamespaces returns the list of all namespaces in the object store.
func (*ObjectStore) GetNSObjectByName ¶
func (store *ObjectStore) GetNSObjectByName(ns, objName string) (interface{}, bool)
GetNSObjectByName gets the object with name objName in the ns store keyed on ns namespace. Returns the object and true if found.
func (*ObjectStore) GetNSStore ¶
func (store *ObjectStore) GetNSStore(nsName string) *ObjectMapStore
GetNSStore returns a specific store for the required nsName namespace.