Documentation ¶
Index ¶
- func CellsToPrune(cellNames []string, desiredCells map[string]*planetscalev2.LockserverSpec, ...) []string
- func DeleteCells(ctx context.Context, ts *topo.Server, recorder record.EventRecorder, ...) (reconcile.Result, error)
- func DeleteKeyspaces(ctx context.Context, ts *topo.Server, recorder record.EventRecorder, ...) (reconcile.Result, error)
- func DeleteShards(ctx context.Context, ts *topo.Server, recorder record.EventRecorder, ...) (reconcile.Result, error)
- func KeyspacesToPrune(keyspaceNames []string, desiredKeyspaces sets.String, ...) []string
- func PruneCells(ctx context.Context, p PruneCellsParams) (reconcile.Result, error)
- func PruneKeyspaces(ctx context.Context, p PruneKeyspacesParams) (reconcile.Result, error)
- func PruneShards(ctx context.Context, p PruneShardsParams) (reconcile.Result, error)
- func RegisterCells(ctx context.Context, c RegisterCellsParams) (reconcile.Result, error)
- func ShardsToPrune(currentShards []string, desiredShards sets.String, ...) []string
- type PruneCellsParams
- type PruneKeyspacesParams
- type PruneShardsParams
- type RegisterCellsParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CellsToPrune ¶
func CellsToPrune(cellNames []string, desiredCells map[string]*planetscalev2.LockserverSpec, orphanedCells map[string]planetscalev2.OrphanStatus) []string
CellsToPrune returns a list of cell candidates for pruning, based on a provided list of cells to consider.
func DeleteCells ¶
func DeleteCells(ctx context.Context, ts *topo.Server, recorder record.EventRecorder, eventObj runtime.Object, cellNames []string) (reconcile.Result, error)
DeleteCells takes in a list of cell names and deletes their CellInfo records from topology.
func DeleteKeyspaces ¶
func DeleteKeyspaces(ctx context.Context, ts *topo.Server, recorder record.EventRecorder, eventObj runtime.Object, keyspaceNames []string) (reconcile.Result, error)
DeleteKeyspaces takes in a list of keyspace names and deletes their records from topology.
func DeleteShards ¶
func DeleteShards(ctx context.Context, ts *topo.Server, recorder record.EventRecorder, eventObj runtime.Object, keyspaceName string, shardNames []string) (reconcile.Result, error)
DeleteShards takes in a list of shard names and deletes their records from topology.
func KeyspacesToPrune ¶
func KeyspacesToPrune(keyspaceNames []string, desiredKeyspaces sets.String, orphanedKeyspaces map[string]planetscalev2.OrphanStatus) []string
KeyspacesToPrune returns a list of keyspace candidates for pruning, based on a provided list of keyspaces to consider.
func PruneCells ¶
PruneCells will prune cells that exist but shouldn't anymore.
func PruneKeyspaces ¶
PruneKeyspaces will prune keyspaces that exist but shouldn't anymore.
func PruneShards ¶
PruneShards will prune shards that exist but shouldn't anymore.
func RegisterCells ¶
func ShardsToPrune ¶
func ShardsToPrune(currentShards []string, desiredShards sets.String, orphanedShards map[string]planetscalev2.OrphanStatus) []string
ShardsToPrune returns a list of shard candidates for pruning, based on a provided list of shards to consider.
Types ¶
type PruneCellsParams ¶
type PruneCellsParams struct { // EventObj holds the object type that the recorder will use when writing events. EventObj runtime.Object TopoServer *topo.Server Recorder record.EventRecorder // DesiredCells is a map of cell names to their lockserver specs. DesiredCells map[string]*planetscalev2.LockserverSpec // OrphanedCells is a list of unwanted cells that could not be turned down. OrphanedCells map[string]planetscalev2.OrphanStatus }
type PruneKeyspacesParams ¶
type PruneKeyspacesParams struct { // EventObj holds the object type that the recorder will use when writing events. EventObj runtime.Object TopoServer *topo.Server Recorder record.EventRecorder // Keyspaces is a current list of KeySpaceTemplates from the cluster spec. Keyspaces []planetscalev2.VitessKeyspaceTemplate // OrphanedKeyspaces is a list of unwanted keyspaces that could not be turned down. OrphanedKeyspaces map[string]planetscalev2.OrphanStatus }
type PruneShardsParams ¶
type PruneShardsParams struct { // EventObj holds the object type that the recorder will use when writing events. EventObj runtime.Object TopoServer *topo.Server Recorder record.EventRecorder KeyspaceName string // DesiredShards is a set of currently desired shard names, usually pulled from the keyspace spec. DesiredShards sets.String // OrphanedShards is a list of unwanted shards that could not be turned down. OrphanedShards map[string]planetscalev2.OrphanStatus }
type RegisterCellsParams ¶
type RegisterCellsParams struct { // EventObj holds the object type that the recorder will use when writing events. EventObj runtime.Object TopoServer *topo.Server Recorder record.EventRecorder GlobalLockserver *planetscalev2.LockserverSpec ClusterName string GlobalTopoImpl string // DesiredCells is a map of cell names to their lockserver specs. DesiredCells map[string]*planetscalev2.LockserverSpec }