/* Copyright 2019 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // This file contains the service definition for making management API // calls to mysqlctld. syntax = "proto3"; option go_package = "vitess.io/vitess/go/vt/proto/mysqlctl"; package mysqlctl; import "topodata.proto"; import "vttime.proto"; message StartRequest{ repeated string mysqld_args = 1; } message StartResponse{} message ShutdownRequest{ bool wait_for_mysqld = 1; } message ShutdownResponse{} message RunMysqlUpgradeRequest{} message RunMysqlUpgradeResponse{} message ApplyBinlogFileRequest{ string binlog_file_name = 1; string binlog_restore_position = 2; vttime.Time binlog_restore_datetime = 3; } message ApplyBinlogFileResponse{} message ReadBinlogFilesTimestampsRequest{ repeated string binlog_file_names = 1; } message ReadBinlogFilesTimestampsResponse{ // FirstTimestamp is the timestamp of the first found transaction searching in order of given binlog files vttime.Time first_timestamp = 1; // FirstTimestampBinlog is the name of the binary log in which the first timestamp is found string first_timestamp_binlog = 2; // LastTimestamp is the timestamp of the last found transaction in given binlog files vttime.Time last_timestamp = 3; // LastTimestampBinlog is the name of the binary log in which the last timestamp is found string last_timestamp_binlog = 4; } message ReinitConfigRequest{} message ReinitConfigResponse{} message RefreshConfigRequest{} message RefreshConfigResponse{} message VersionStringRequest{} message VersionStringResponse{ string version = 1; } // MysqlCtl is the service definition service MysqlCtl { rpc Start(StartRequest) returns (StartResponse) {}; rpc Shutdown(ShutdownRequest) returns (ShutdownResponse) {}; rpc RunMysqlUpgrade(RunMysqlUpgradeRequest) returns (RunMysqlUpgradeResponse) {}; rpc ApplyBinlogFile(ApplyBinlogFileRequest) returns (ApplyBinlogFileResponse) {}; rpc ReadBinlogFilesTimestamps(ReadBinlogFilesTimestampsRequest) returns (ReadBinlogFilesTimestampsResponse) {}; rpc ReinitConfig(ReinitConfigRequest) returns (ReinitConfigResponse) {}; rpc RefreshConfig(RefreshConfigRequest) returns (RefreshConfigResponse) {}; rpc VersionString(VersionStringRequest) returns (VersionStringResponse) {}; } // BackupInfo is the read-only attributes of a mysqlctl/backupstorage.BackupHandle. message BackupInfo { string name = 1; string directory = 2; string keyspace = 3; string shard = 4; // The following fields will be extracted from the .Name field. If an error // occurs during extraction/parsing, these fields may not be set, but // VtctldServer.GetBackups will not fail. topodata.TabletAlias tablet_alias = 5; vttime.Time time = 6; // The following fields are may or may not be currently set. Work is inflight // to fully-support these fields in all backupengine/storage implementations. // See https://github.com/vitessio/vitess/issues/8332. // Engine is the name of the backupengine implementation used to create // this backup. string engine = 7; Status status = 8; // Status is an enum representing the possible status of a backup. enum Status { UNKNOWN = 0; INCOMPLETE = 1; COMPLETE = 2; // A backup status of INVALID should be set if the backup is complete // but unusable in some way (partial upload, corrupt file, etc). INVALID = 3; // A backup status of VALID should be set if the backup is both // complete and usuable. VALID = 4; } }