Documentation
¶
Index ¶
- func NewCacheWatcher(user user.Info, authCache WatchableCache, includeAllExistingResources bool) *cacheWatcher
- type AuthCache
- type CacheWatcher
- type ClusterCache
- func (c *ClusterCache) AddWatcher(w CacheWatcher)
- func (c *ClusterCache) ConvertResource(name string) runtime.Object
- func (c *ClusterCache) Get(name string) (runtime.Object, error)
- func (c *ClusterCache) List(userInfo user.Info, selector labels.Selector) (*clusterv1.ManagedClusterList, error)
- func (c *ClusterCache) ListObjects(userInfo user.Info) (runtime.Object, error)
- func (c *ClusterCache) ListResources() (sets.String, error)
- func (c *ClusterCache) RemoveWatcher(w CacheWatcher)
- func (c *ClusterCache) Run(period time.Duration)
- type ClusterLister
- type ClusterSetCache
- func (c *ClusterSetCache) AddWatcher(w CacheWatcher)
- func (c *ClusterSetCache) ConvertResource(name string) runtime.Object
- func (c *ClusterSetCache) Get(name string) (runtime.Object, error)
- func (c *ClusterSetCache) List(userInfo user.Info, selector labels.Selector) (*clusterv1alpha1.ManagedClusterSetList, error)
- func (c *ClusterSetCache) ListObjects(userInfo user.Info) (runtime.Object, error)
- func (c *ClusterSetCache) ListResources() (sets.String, error)
- func (c *ClusterSetCache) RemoveWatcher(w CacheWatcher)
- func (c *ClusterSetCache) Run(period time.Duration)
- type ClusterSetLister
- type LastSyncResourceVersioner
- type SubjectRecord
- type SyncedClusterRoleBindingLister
- type SyncedClusterRoleLister
- type WatchableCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCacheWatcher ¶
func NewCacheWatcher(user user.Info, authCache WatchableCache, includeAllExistingResources bool) *cacheWatcher
Types ¶
type AuthCache ¶
type AuthCache struct {
// contains filtered or unexported fields
}
func NewAuthCache ¶
func NewAuthCache(clusterRoleInformer rbacv1informers.ClusterRoleInformer, clusterRolebindingInformer rbacv1informers.ClusterRoleBindingInformer, group, resource string, lastSyncResourceVersioner LastSyncResourceVersioner, syncResourcesFunc func() (sets.String, error), getResourceNamesFromClusterRole func(*rbacv1.ClusterRole, string, string) (sets.String, bool), ) *AuthCache
func (*AuthCache) AddWatcher ¶
func (ac *AuthCache) AddWatcher(watcher CacheWatcher)
func (*AuthCache) GetGroupSubjectRecord ¶
func (ac *AuthCache) GetGroupSubjectRecord() []*SubjectRecord
func (*AuthCache) GetUserSubjectRecord ¶
func (ac *AuthCache) GetUserSubjectRecord() []*SubjectRecord
func (*AuthCache) RemoveWatcher ¶
func (ac *AuthCache) RemoveWatcher(watcher CacheWatcher)
type CacheWatcher ¶
type CacheWatcher interface { // GroupMembershipChanged is called serially for all changes for all watchers. This method MUST NOT BLOCK. // The serial nature makes reasoning about the code easy, but if you block in this method you will doom all watchers. GroupMembershipChanged(names, users, groups sets.String) }
type ClusterCache ¶
type ClusterCache struct {
// contains filtered or unexported fields
}
func NewClusterCache ¶
func NewClusterCache(clusterInformer clusterinformerv1.ManagedClusterInformer, clusterRoleInformer rbacv1informers.ClusterRoleInformer, clusterRolebindingInformer rbacv1informers.ClusterRoleBindingInformer, getResourceNamesFromClusterRole func(*v1.ClusterRole, string, string) (sets.String, bool), ) *ClusterCache
func (*ClusterCache) AddWatcher ¶
func (c *ClusterCache) AddWatcher(w CacheWatcher)
func (*ClusterCache) ConvertResource ¶
func (c *ClusterCache) ConvertResource(name string) runtime.Object
func (*ClusterCache) List ¶
func (c *ClusterCache) List(userInfo user.Info, selector labels.Selector) (*clusterv1.ManagedClusterList, error)
func (*ClusterCache) ListObjects ¶
func (*ClusterCache) ListResources ¶
func (c *ClusterCache) ListResources() (sets.String, error)
func (*ClusterCache) RemoveWatcher ¶
func (c *ClusterCache) RemoveWatcher(w CacheWatcher)
func (*ClusterCache) Run ¶
func (c *ClusterCache) Run(period time.Duration)
Run begins watching and synchronizing the cache
type ClusterLister ¶
type ClusterLister interface { // List returns the list of ManagedCluster items that the user can access List(user user.Info, selector labels.Selector) (*clusterv1.ManagedClusterList, error) }
ClusterLister enforces ability to enumerate cluster based on role
type ClusterSetCache ¶
type ClusterSetCache struct { Cache *AuthCache // contains filtered or unexported fields }
func NewClusterSetCache ¶
func NewClusterSetCache(clusterSetInformer clusterinformerv1alpha1.ManagedClusterSetInformer, clusterRoleInformer rbacv1informers.ClusterRoleInformer, clusterRolebindingInformer rbacv1informers.ClusterRoleBindingInformer, getResourceNamesFromClusterRole func(*v1.ClusterRole, string, string) (sets.String, bool), ) *ClusterSetCache
func (*ClusterSetCache) AddWatcher ¶
func (c *ClusterSetCache) AddWatcher(w CacheWatcher)
func (*ClusterSetCache) ConvertResource ¶
func (c *ClusterSetCache) ConvertResource(name string) runtime.Object
func (*ClusterSetCache) List ¶
func (c *ClusterSetCache) List(userInfo user.Info, selector labels.Selector) (*clusterv1alpha1.ManagedClusterSetList, error)
func (*ClusterSetCache) ListObjects ¶
func (*ClusterSetCache) ListResources ¶
func (c *ClusterSetCache) ListResources() (sets.String, error)
func (*ClusterSetCache) RemoveWatcher ¶
func (c *ClusterSetCache) RemoveWatcher(w CacheWatcher)
func (*ClusterSetCache) Run ¶
func (c *ClusterSetCache) Run(period time.Duration)
Run begins watching and synchronizing the cache
type ClusterSetLister ¶
type ClusterSetLister interface { // List returns the list of ManagedClusterSet items that the user can access List(user user.Info, selector labels.Selector) (*clusterv1alpha1.ManagedClusterSetList, error) }
ClusterSetLister enforces ability to enumerate clusterSet based on role
type LastSyncResourceVersioner ¶
type LastSyncResourceVersioner interface {
LastSyncResourceVersion() string
}
LastSyncResourceVersioner is any object that can divulge a LastSyncResourceVersion
type SubjectRecord ¶
SubjectRecord is a cache record for the set of resources a subject can access
type SyncedClusterRoleBindingLister ¶
type SyncedClusterRoleBindingLister interface { rbacv1listers.ClusterRoleBindingLister LastSyncResourceVersioner }
type SyncedClusterRoleLister ¶
type SyncedClusterRoleLister interface { rbacv1listers.ClusterRoleLister LastSyncResourceVersioner }
Click to show internal directories.
Click to hide internal directories.