Documentation
¶
Index ¶
- type Index
- type PathRewriter
- type State
- func (c *State) DeleteLogicalCluster(shard string, logicalCluster *corev1alpha1.LogicalCluster)
- func (c *State) DeleteShard(shardName string)
- func (c *State) DeleteWorkspace(shard string, ws *tenancyv1alpha1.Workspace)
- func (c *State) Lookup(path logicalcluster.Path) (shard string, cluster logicalcluster.Name, found bool)
- func (c *State) LookupURL(path logicalcluster.Path) (url string, found bool)
- func (c *State) UpsertLogicalCluster(shard string, logicalCluster *corev1alpha1.LogicalCluster)
- func (c *State) UpsertShard(shardName, baseURL string)
- func (c *State) UpsertWorkspace(shard string, ws *tenancyv1alpha1.Workspace)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index interface { Lookup(path logicalcluster.Path) (shard string, cluster, canonicalPath logicalcluster.Path, found bool) LookupURL(logicalCluster logicalcluster.Path) (url string, canonicalPath logicalcluster.Path, found bool) }
Index implements a mapping from logical cluster to (shard) URL.
type PathRewriter ¶
PathRewriter can rewrite a logical cluster path before the actual mapping through the index data.
type State ¶
type State struct {
// contains filtered or unexported fields
}
State watches Shards on the root shard, and then starts informers for every Shard, watching the Workspaces on them. It then updates the workspace index, which maps logical clusters to shard URLs.
func New ¶
func New(rewriters []PathRewriter) *State
func (*State) DeleteLogicalCluster ¶
func (c *State) DeleteLogicalCluster(shard string, logicalCluster *corev1alpha1.LogicalCluster)
func (*State) DeleteShard ¶
func (*State) DeleteWorkspace ¶
func (c *State) DeleteWorkspace(shard string, ws *tenancyv1alpha1.Workspace)
func (*State) UpsertLogicalCluster ¶
func (c *State) UpsertLogicalCluster(shard string, logicalCluster *corev1alpha1.LogicalCluster)
func (*State) UpsertShard ¶
func (*State) UpsertWorkspace ¶
func (c *State) UpsertWorkspace(shard string, ws *tenancyv1alpha1.Workspace)
Click to show internal directories.
Click to hide internal directories.