vitess.io/vitess@v0.16.2/proto/tabletmanagerservice.proto (about)

     1  /*
     2  Copyright 2019 The Vitess Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // This file contains the service definition for making management API
    18  // calls to VtTablet.
    19  
    20  syntax = "proto3";
    21  option go_package = "vitess.io/vitess/go/vt/proto/tabletmanagerservice";
    22  
    23  package tabletmanagerservice;
    24  
    25  import "tabletmanagerdata.proto";
    26  
    27  // TabletManager is a service definition for tabletmanagerdata.TabletManager.
    28  service TabletManager {
    29    //
    30    // Various read-only methods
    31    //
    32  
    33    // Ping returns the input payload
    34    rpc Ping(tabletmanagerdata.PingRequest) returns (tabletmanagerdata.PingResponse) {};
    35  
    36    // Sleep sleeps for the provided duration
    37    rpc Sleep(tabletmanagerdata.SleepRequest) returns (tabletmanagerdata.SleepResponse) {};
    38  
    39    // ExecuteHook executes the hook remotely
    40    rpc ExecuteHook(tabletmanagerdata.ExecuteHookRequest) returns (tabletmanagerdata.ExecuteHookResponse) {};
    41  
    42    // GetSchema asks the tablet for its schema
    43    rpc GetSchema(tabletmanagerdata.GetSchemaRequest) returns (tabletmanagerdata.GetSchemaResponse) {};
    44  
    45    // GetPermissions asks the tablet for its permissions
    46    rpc GetPermissions(tabletmanagerdata.GetPermissionsRequest) returns (tabletmanagerdata.GetPermissionsResponse) {};
    47  
    48    //
    49    // Various read-write methods
    50    //
    51  
    52    rpc SetReadOnly(tabletmanagerdata.SetReadOnlyRequest) returns (tabletmanagerdata.SetReadOnlyResponse) {};
    53  
    54    rpc SetReadWrite(tabletmanagerdata.SetReadWriteRequest) returns (tabletmanagerdata.SetReadWriteResponse) {};
    55  
    56    // ChangeType asks the remote tablet to change its type
    57    rpc ChangeType(tabletmanagerdata.ChangeTypeRequest) returns (tabletmanagerdata.ChangeTypeResponse) {};
    58  
    59    rpc RefreshState(tabletmanagerdata.RefreshStateRequest) returns (tabletmanagerdata.RefreshStateResponse) {};
    60  
    61    rpc RunHealthCheck(tabletmanagerdata.RunHealthCheckRequest) returns (tabletmanagerdata.RunHealthCheckResponse) {};
    62  
    63    rpc ReloadSchema(tabletmanagerdata.ReloadSchemaRequest) returns (tabletmanagerdata.ReloadSchemaResponse) {};
    64  
    65    rpc PreflightSchema(tabletmanagerdata.PreflightSchemaRequest) returns (tabletmanagerdata.PreflightSchemaResponse) {};
    66  
    67    rpc ApplySchema(tabletmanagerdata.ApplySchemaRequest) returns (tabletmanagerdata.ApplySchemaResponse) {};
    68  
    69    rpc LockTables(tabletmanagerdata.LockTablesRequest) returns (tabletmanagerdata.LockTablesResponse) {};
    70  
    71    rpc UnlockTables(tabletmanagerdata.UnlockTablesRequest) returns (tabletmanagerdata.UnlockTablesResponse) {};
    72  
    73    rpc ExecuteQuery(tabletmanagerdata.ExecuteQueryRequest) returns (tabletmanagerdata.ExecuteQueryResponse) {};
    74  
    75    rpc ExecuteFetchAsDba(tabletmanagerdata.ExecuteFetchAsDbaRequest) returns (tabletmanagerdata.ExecuteFetchAsDbaResponse) {};
    76  
    77    rpc ExecuteFetchAsAllPrivs(tabletmanagerdata.ExecuteFetchAsAllPrivsRequest) returns (tabletmanagerdata.ExecuteFetchAsAllPrivsResponse) {};
    78  
    79    rpc ExecuteFetchAsApp(tabletmanagerdata.ExecuteFetchAsAppRequest) returns (tabletmanagerdata.ExecuteFetchAsAppResponse) {};
    80  
    81    //
    82    // Replication related methods
    83    //
    84  
    85    // ReplicationStatus returns the current replication status.
    86    rpc ReplicationStatus(tabletmanagerdata.ReplicationStatusRequest) returns (tabletmanagerdata.ReplicationStatusResponse) {};
    87  
    88    // PrimaryStatus returns the current primary status.
    89    rpc PrimaryStatus(tabletmanagerdata.PrimaryStatusRequest) returns (tabletmanagerdata.PrimaryStatusResponse) {};
    90  
    91    // PrimaryPosition returns the current primary position
    92    rpc PrimaryPosition(tabletmanagerdata.PrimaryPositionRequest) returns (tabletmanagerdata.PrimaryPositionResponse) {};
    93  
    94    // WaitForPosition waits for the position to be reached
    95    rpc WaitForPosition(tabletmanagerdata.WaitForPositionRequest) returns (tabletmanagerdata.WaitForPositionResponse) {};
    96  
    97    // StopReplication makes mysql stop its replication
    98    rpc StopReplication(tabletmanagerdata.StopReplicationRequest) returns (tabletmanagerdata.StopReplicationResponse) {};
    99  
   100    // StopReplicationMinimum stops the mysql replication after it reaches
   101    // the provided minimum point
   102    rpc StopReplicationMinimum(tabletmanagerdata.StopReplicationMinimumRequest) returns (tabletmanagerdata.StopReplicationMinimumResponse) {};
   103  
   104    // StartReplication starts the mysql replication
   105    rpc StartReplication(tabletmanagerdata.StartReplicationRequest) returns (tabletmanagerdata.StartReplicationResponse) {};
   106  
   107    // StartReplicationUnitAfter starts the mysql replication until and including
   108    // the provided position
   109    rpc StartReplicationUntilAfter(tabletmanagerdata.StartReplicationUntilAfterRequest) returns (tabletmanagerdata.StartReplicationUntilAfterResponse) {};
   110  
   111    // GetReplicas asks for the list of mysql replicas
   112    rpc GetReplicas(tabletmanagerdata.GetReplicasRequest) returns (tabletmanagerdata.GetReplicasResponse) {};
   113  
   114    // VReplication API
   115    rpc VReplicationExec(tabletmanagerdata.VReplicationExecRequest) returns(tabletmanagerdata.VReplicationExecResponse) {};
   116    rpc VReplicationWaitForPos(tabletmanagerdata.VReplicationWaitForPosRequest) returns(tabletmanagerdata.VReplicationWaitForPosResponse) {};
   117  
   118    // VDiff API
   119    rpc VDiff(tabletmanagerdata.VDiffRequest) returns(tabletmanagerdata.VDiffResponse) {};
   120  
   121    //
   122    // Reparenting related functions
   123    //
   124  
   125    // ResetReplication makes the target not replicating
   126    rpc ResetReplication(tabletmanagerdata.ResetReplicationRequest) returns (tabletmanagerdata.ResetReplicationResponse) {};
   127  
   128    // InitPrimary initializes the tablet as a primary
   129    rpc InitPrimary(tabletmanagerdata.InitPrimaryRequest) returns (tabletmanagerdata.InitPrimaryResponse) {};
   130  
   131    // PopulateReparentJournal tells the tablet to add an entry to its
   132    // reparent journal
   133    rpc PopulateReparentJournal(tabletmanagerdata.PopulateReparentJournalRequest) returns (tabletmanagerdata.PopulateReparentJournalResponse) {};
   134  
   135    // InitReplica tells the tablet to reparent to the primary unconditionally
   136    rpc InitReplica(tabletmanagerdata.InitReplicaRequest) returns (tabletmanagerdata.InitReplicaResponse) {};
   137  
   138    // DemotePrimary tells the soon-to-be-former primary it's gonna change
   139    rpc DemotePrimary(tabletmanagerdata.DemotePrimaryRequest) returns (tabletmanagerdata.DemotePrimaryResponse) {};
   140  
   141    // UndoDemotePrimary reverts all changes made by DemotePrimary
   142    rpc UndoDemotePrimary(tabletmanagerdata.UndoDemotePrimaryRequest) returns (tabletmanagerdata.UndoDemotePrimaryResponse) {};
   143  
   144    // ReplicaWasPromoted tells the remote tablet it is now the primary
   145    rpc ReplicaWasPromoted(tabletmanagerdata.ReplicaWasPromotedRequest) returns (tabletmanagerdata.ReplicaWasPromotedResponse) {};
   146  
   147    // ResetReplicationParameters resets the replica replication parameters
   148    rpc ResetReplicationParameters(tabletmanagerdata.ResetReplicationParametersRequest) returns (tabletmanagerdata.ResetReplicationParametersResponse) {};
   149  
   150    // FullStatus collects and returns the full status of MySQL including the replication information, semi-sync information, GTID information among others
   151    rpc FullStatus(tabletmanagerdata.FullStatusRequest) returns (tabletmanagerdata.FullStatusResponse) {};
   152  
   153    // SetReplicationSource tells the replica to reparent
   154    rpc SetReplicationSource(tabletmanagerdata.SetReplicationSourceRequest) returns (tabletmanagerdata.SetReplicationSourceResponse) {};
   155  
   156    // ReplicaWasRestarted tells the remote tablet its primary has changed
   157    rpc ReplicaWasRestarted(tabletmanagerdata.ReplicaWasRestartedRequest) returns (tabletmanagerdata.ReplicaWasRestartedResponse) {};
   158  
   159    // StopReplicationAndGetStatus stops MySQL replication, and returns the
   160    // replication status
   161    rpc StopReplicationAndGetStatus(tabletmanagerdata.StopReplicationAndGetStatusRequest) returns (tabletmanagerdata.StopReplicationAndGetStatusResponse) {};
   162  
   163    // PromoteReplica makes the replica the new primary
   164    rpc PromoteReplica(tabletmanagerdata.PromoteReplicaRequest) returns (tabletmanagerdata.PromoteReplicaResponse) {};
   165  
   166    //
   167    // Backup related methods
   168    //
   169  
   170    rpc Backup(tabletmanagerdata.BackupRequest) returns (stream tabletmanagerdata.BackupResponse) {};
   171  
   172    // RestoreFromBackup deletes all local data and restores it from the latest backup.
   173    rpc RestoreFromBackup(tabletmanagerdata.RestoreFromBackupRequest) returns (stream tabletmanagerdata.RestoreFromBackupResponse) {};
   174  
   175    // Generic VExec request. Can be used for various purposes
   176    rpc VExec(tabletmanagerdata.VExecRequest) returns(tabletmanagerdata.VExecResponse) {};
   177  }