Documentation ¶
Overview ¶
Package vtctld contains all the code to expose a vtctld server based on the provided topo.Server.
Index ¶
- func HandleExplorer(name string, exp explorer.Explorer)
- func InitVtctld(ts topo.Server)
- type ActionRepository
- func (ar *ActionRepository) ApplyKeyspaceAction(ctx context.Context, actionName, keyspace string, r *http.Request) *ActionResult
- func (ar *ActionRepository) ApplyShardAction(ctx context.Context, actionName, keyspace, shard string, r *http.Request) *ActionResult
- func (ar *ActionRepository) ApplyTabletAction(ctx context.Context, actionName string, tabletAlias *topodatapb.TabletAlias, ...) *ActionResult
- func (ar *ActionRepository) RegisterKeyspaceAction(name string, method actionKeyspaceMethod)
- func (ar *ActionRepository) RegisterShardAction(name string, method actionShardMethod)
- func (ar *ActionRepository) RegisterTabletAction(name, role string, method actionTabletMethod)
- type ActionResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleExplorer ¶
HandleExplorer registers the Explorer under url, using the given template. It should be called by a plugin either from init() or from servenv.OnRun(). Only one Explorer can be registered in a given instance of vtctld.
func InitVtctld ¶
InitVtctld initializes all the vtctld functionnality.
Types ¶
type ActionRepository ¶
type ActionRepository struct {
// contains filtered or unexported fields
}
ActionRepository is a repository of actions that can be performed on a {Keyspace,Shard,Tablet}. Note that the registered action methods will be passed an *http.Request on which ParseForm() has already succeeded.
func NewActionRepository ¶
func NewActionRepository(ts topo.Server) *ActionRepository
NewActionRepository creates and returns a new ActionRepository, with no actions.
func (*ActionRepository) ApplyKeyspaceAction ¶
func (ar *ActionRepository) ApplyKeyspaceAction(ctx context.Context, actionName, keyspace string, r *http.Request) *ActionResult
ApplyKeyspaceAction applies the provided action to the keyspace.
func (*ActionRepository) ApplyShardAction ¶
func (ar *ActionRepository) ApplyShardAction(ctx context.Context, actionName, keyspace, shard string, r *http.Request) *ActionResult
ApplyShardAction applies the provided action to the shard.
func (*ActionRepository) ApplyTabletAction ¶
func (ar *ActionRepository) ApplyTabletAction(ctx context.Context, actionName string, tabletAlias *topodatapb.TabletAlias, r *http.Request) *ActionResult
ApplyTabletAction applies the provided action to the tablet.
func (*ActionRepository) RegisterKeyspaceAction ¶
func (ar *ActionRepository) RegisterKeyspaceAction(name string, method actionKeyspaceMethod)
RegisterKeyspaceAction registers a new action on a keyspace.
func (*ActionRepository) RegisterShardAction ¶
func (ar *ActionRepository) RegisterShardAction(name string, method actionShardMethod)
RegisterShardAction registers a new action on a shard.
func (*ActionRepository) RegisterTabletAction ¶
func (ar *ActionRepository) RegisterTabletAction(name, role string, method actionTabletMethod)
RegisterTabletAction registers a new action on a tablet.