dbtesterpb: define 'dbtester' configurations in protocol buffer

This commit is contained in:
Gyu-Ho Lee 2017-02-23 08:01:00 -08:00
parent a8bdcc9db2
commit c4ddeb3ce7
No known key found for this signature in database
GPG Key ID: 1DDD39C7EB70C24C
19 changed files with 8108 additions and 760 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
syntax = "proto3";
package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
// ConfigAnalyzeMachineInitial represents common control options and test data information for analyzer machine.
message ConfigAnalyzeMachineInitial {
string DatabaseID = 1;
string DatabaseTag = 2;
string DatabaseDescription = 3;
string PathPrefix = 4 [(gogoproto.moretags) = "yaml:\"path_prefix\""];
string ClientSystemMetricsInterpolatedPath = 5 [(gogoproto.moretags) = "yaml:\"client_system_metrics_interpolated_path\""];
string ClientLatencyThroughputTimeseriesPath = 6 [(gogoproto.moretags) = "yaml:\"client_latency_throughput_timeseries_path\""];
string ClientLatencyDistributionAllPath = 7 [(gogoproto.moretags) = "yaml:\"client_latency_distribution_all_path\""];
string ClientLatencyDistributionPercentilePath = 8 [(gogoproto.moretags) = "yaml:\"client_latency_distribution_percentile_path\""];
string ClientLatencyDistributionSummaryPath = 9 [(gogoproto.moretags) = "yaml:\"client_latency_distribution_summary_path\""];
string ClientLatencyByKeyNumberPath = 10 [(gogoproto.moretags) = "yaml:\"client_latency_by_key_number_path\""];
string ServerDiskSpaceUsageSummaryPath = 11 [(gogoproto.moretags) = "yaml:\"server_disk_space_usage_summary_path\""];
string ServerMemoryByKeyNumberPath = 12 [(gogoproto.moretags) = "yaml:\"server_memory_by_key_number_path\""];
string ServerReadBytesDeltaByKeyNumberPath = 13 [(gogoproto.moretags) = "yaml:\"server_read_bytes_delta_by_key_number_path\""];
string ServerWriteBytesDeltaByKeyNumberPath = 14 [(gogoproto.moretags) = "yaml:\"server_write_bytes_delta_by_key_number_path\""];
repeated string ServerSystemMetricsInterpolatedPathList = 15 [(gogoproto.moretags) = "yaml:\"server_system_metrics_interpolated_path_list\""];
string AllAggregatedOutputPath = 16 [(gogoproto.moretags) = "yaml:\"all_aggregated_output_path\""];
}
message ConfigAnalyzeMachineAllAggregatedOutput {
string AllAggregatedOutputPathCSV = 1 [(gogoproto.moretags) = "yaml:\"all_aggregated_output_path_csv\""];
string AllAggregatedOutputPathTXT = 2 [(gogoproto.moretags) = "yaml:\"all_aggregated_output_path_txt\""];
}
// ConfigAnalyzeMachinePlot defines plot configuration.
message ConfigAnalyzeMachinePlot {
string Column = 1 [(gogoproto.moretags) = "yaml:\"column\""];
string XAxis = 2 [(gogoproto.moretags) = "yaml:\"x_axis\""];
string YAxis = 3 [(gogoproto.moretags) = "yaml:\"y_axis\""];
string OutputPathCSV = 4 [(gogoproto.moretags) = "yaml:\"output_path_csv\""];
repeated string OutputPathList = 5 [(gogoproto.moretags) = "yaml:\"output_path_list\""];
}
// ConfigAnalyzeMachineImage defines image configuration.
message ConfigAnalyzeMachineImage {
string Title = 1 [(gogoproto.moretags) = "yaml:\"title\""];
string Path = 2 [(gogoproto.moretags) = "yaml:\"path\""];
string Type = 3 [(gogoproto.moretags) = "yaml:\"type\""];
}
// ConfigAnalyzeMachineREADME defines read configuration.
message ConfigAnalyzeMachineREADME {
string OutputPath = 1 [(gogoproto.moretags) = "yaml:\"output_path\""];
repeated ConfigAnalyzeMachineImage Images = 2 [(gogoproto.moretags) = "yaml:\"images\""];
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,92 @@
syntax = "proto3";
package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "dbtesterpb/flag_etcd.proto";
import "dbtesterpb/flag_zookeeper.proto";
import "dbtesterpb/flag_consul.proto";
import "dbtesterpb/flag_zetcd.proto";
import "dbtesterpb/flag_cetcd.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
// ConfigClientMachineInitial represents common control options on client machine.
message ConfigClientMachineInitial {
string PathPrefix = 1 [(gogoproto.moretags) = "yaml:\"path_prefix\""];
string LogPath = 2 [(gogoproto.moretags) = "yaml:\"log_path\""];
string ClientSystemMetricsPath = 3 [(gogoproto.moretags) = "yaml:\"client_system_metrics_path\""];
string ClientSystemMetricsInterpolatedPath = 4 [(gogoproto.moretags) = "yaml:\"client_system_metrics_interpolated_path\""];
string ClientLatencyThroughputTimeseriesPath = 5 [(gogoproto.moretags) = "yaml:\"client_latency_throughput_timeseries_path\""];
string ClientLatencyDistributionAllPath = 6 [(gogoproto.moretags) = "yaml:\"client_latency_distribution_all_path\""];
string ClientLatencyDistributionPercentilePath = 7 [(gogoproto.moretags) = "yaml:\"client_latency_distribution_percentile_path\""];
string ClientLatencyDistributionSummaryPath = 8 [(gogoproto.moretags) = "yaml:\"client_latency_distribution_summary_path\""];
string ClientLatencyByKeyNumberPath = 9 [(gogoproto.moretags) = "yaml:\"client_latency_by_key_number_path\""];
string ServerDiskSpaceUsageSummaryPath = 10 [(gogoproto.moretags) = "yaml:\"server_disk_space_usage_summary_path\""];
string GoogleCloudProjectName = 100 [(gogoproto.moretags) = "yaml:\"google_cloud_project_name\""];
string GoogleCloudStorageKeyPath = 101 [(gogoproto.moretags) = "yaml:\"google_cloud_storage_key_path\""];
string GoogleCloudStorageKey = 102;
string GoogleCloudStorageBucketName = 103 [(gogoproto.moretags) = "yaml:\"google_cloud_storage_bucket_name\""];
string GoogleCloudStorageSubDirectory = 104 [(gogoproto.moretags) = "yaml:\"google_cloud_storage_sub_directory\""];
}
// ConfigClientMachineBenchmarkOptions represents benchmark options.
message ConfigClientMachineBenchmarkOptions {
string Type = 1 [(gogoproto.moretags) = "yaml:\"type\""];
int64 RequestNumber = 2 [(gogoproto.moretags) = "yaml:\"request_number\""];
int64 ConnectionNumber = 3 [(gogoproto.moretags) = "yaml:\"connection_number\""];
int64 ClientNumber = 4 [(gogoproto.moretags) = "yaml:\"client_number\""];
repeated int64 ConnectionClientNumbers = 5 [(gogoproto.moretags) = "yaml:\"connection_client_numbers\""];
int64 RateLimitRequestsPerSecond = 6 [(gogoproto.moretags) = "yaml:\"rate_limit_requests_per_second\""];
bool SameKey = 7 [(gogoproto.moretags) = "yaml:\"same_key\""];
int64 KeySizeBytes = 8 [(gogoproto.moretags) = "yaml:\"key_size_bytes\""];
int64 ValueSizeBytes = 9 [(gogoproto.moretags) = "yaml:\"value_size_bytes\""];
bool StaleRead = 10 [(gogoproto.moretags) = "yaml:\"stale_read\""];
}
// ConfigClientMachineBenchmarkSteps represents benchmark steps.
message ConfigClientMachineBenchmarkSteps {
bool Step1StartDatabase = 1 [(gogoproto.moretags) = "yaml:\"step1_start_database\""];
bool Step2StressDatabase = 2 [(gogoproto.moretags) = "yaml:\"step2_stress_database\""];
bool Step3StopDatabase = 3 [(gogoproto.moretags) = "yaml:\"step3_stop_database\""];
bool Step4UploadLogs = 4 [(gogoproto.moretags) = "yaml:\"step4_upload_logs\""];
}
// ConfigClientMachineAgentControl represents control options on client machine.
message ConfigClientMachineAgentControl {
string DatabaseID = 1 [(gogoproto.moretags) = "yaml:\"database_id\""];
string DatabaseDescription = 2 [(gogoproto.moretags) = "yaml:\"database_description\""];
string DatabaseTag = 3 [(gogoproto.moretags) = "yaml:\"database_tag\""];
repeated string PeerIPs = 4 [(gogoproto.moretags) = "yaml:\"peer_ips\""];
string PeerIPsString = 5 [(gogoproto.moretags) = "yaml:\"peer_ips_string\""];
int64 AgentPortToConnect = 6 [(gogoproto.moretags) = "yaml:\"agent_port_to_connect\""];
repeated string AgentEndpoints = 7 [(gogoproto.moretags) = "yaml:\"agent_endpoints\""];
int64 DatabasePortToConnect = 8 [(gogoproto.moretags) = "yaml:\"database_port_to_connect\""];
repeated string DatabaseEndpoints = 9 [(gogoproto.moretags) = "yaml:\"database_endpoints\""];
flag__etcd__v2_3 flag__etcd__v2_3 = 100 [(gogoproto.moretags) = "yaml:\"etcd__v2_3\""];
flag__etcd__v3_1 flag__etcd__v3_1 = 101 [(gogoproto.moretags) = "yaml:\"etcd__v3_1\""];
flag__etcd__v3_2 flag__etcd__v3_2 = 102 [(gogoproto.moretags) = "yaml:\"etcd__v3_2\""];
flag__etcd__tip flag__etcd__tip = 103 [(gogoproto.moretags) = "yaml:\"etcd__tip\""];
flag__zookeeper__r3_4_9 flag__zookeeper__r3_4_9 = 200 [(gogoproto.moretags) = "yaml:\"zookeeper__r3_4_9\""];
flag__zookeeper__r3_5_2_alpha flag__zookeeper__r3_5_2_alpha = 201 [(gogoproto.moretags) = "yaml:\"zookeeper__r3_5_2_alpha\""];
flag__consul__v0_7_5 flag__consul__v0_7_5 = 300 [(gogoproto.moretags) = "yaml:\"consul__v0_7_5\""];
flag__consul__v0_8_0 flag__consul__v0_8_0 = 301 [(gogoproto.moretags) = "yaml:\"consul__v0_8_0\""];
flag__cetcd__beta flag__cetcd__beta = 400 [(gogoproto.moretags) = "yaml:\"cetcd__beta\""];
flag__zetcd__beta flag__zetcd__beta = 500 [(gogoproto.moretags) = "yaml:\"zetcd__beta\""];
ConfigClientMachineBenchmarkOptions ConfigClientMachineBenchmarkOptions = 1000 [(gogoproto.moretags) = "yaml:\"benchmark_options\""];
ConfigClientMachineBenchmarkSteps ConfigClientMachineBenchmarkSteps = 1001 [(gogoproto.moretags) = "yaml:\"benchmark_steps\""];
}

View File

@ -0,0 +1,88 @@
// Code generated by protoc-gen-gogo.
// source: dbtesterpb/database_id.proto
// DO NOT EDIT!
package dbtesterpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// differentiate between major or minor releases
// (possibly different APIs)
type DatabaseID int32
const (
DatabaseID_etcd__v2_3 DatabaseID = 0
DatabaseID_etcd__v3_1 DatabaseID = 1
DatabaseID_etcd__v3_2 DatabaseID = 2
DatabaseID_etcd__tip DatabaseID = 3
DatabaseID_zookeeper__r3_4_9 DatabaseID = 10
DatabaseID_zookeeper__r3_5_2_alpha DatabaseID = 11
DatabaseID_consul__v0_7_5 DatabaseID = 20
DatabaseID_consul__v0_8_0 DatabaseID = 21
DatabaseID_zetcd__beta DatabaseID = 30
DatabaseID_cetcd__beta DatabaseID = 40
)
var DatabaseID_name = map[int32]string{
0: "etcd__v2_3",
1: "etcd__v3_1",
2: "etcd__v3_2",
3: "etcd__tip",
10: "zookeeper__r3_4_9",
11: "zookeeper__r3_5_2_alpha",
20: "consul__v0_7_5",
21: "consul__v0_8_0",
30: "zetcd__beta",
40: "cetcd__beta",
}
var DatabaseID_value = map[string]int32{
"etcd__v2_3": 0,
"etcd__v3_1": 1,
"etcd__v3_2": 2,
"etcd__tip": 3,
"zookeeper__r3_4_9": 10,
"zookeeper__r3_5_2_alpha": 11,
"consul__v0_7_5": 20,
"consul__v0_8_0": 21,
"zetcd__beta": 30,
"cetcd__beta": 40,
}
func (x DatabaseID) String() string {
return proto.EnumName(DatabaseID_name, int32(x))
}
func (DatabaseID) EnumDescriptor() ([]byte, []int) { return fileDescriptorDatabaseId, []int{0} }
func init() {
proto.RegisterEnum("dbtesterpb.DatabaseID", DatabaseID_name, DatabaseID_value)
}
func init() { proto.RegisterFile("dbtesterpb/database_id.proto", fileDescriptorDatabaseId) }
var fileDescriptorDatabaseId = []byte{
// 245 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x8f, 0xcf, 0x4a, 0xc3, 0x40,
0x10, 0x87, 0xb3, 0x0a, 0x82, 0x53, 0xac, 0xe3, 0xd2, 0x22, 0xa8, 0xec, 0x59, 0x04, 0x9b, 0x9a,
0x58, 0xd4, 0xab, 0xf4, 0xe2, 0x53, 0x0c, 0xbb, 0xc9, 0x9a, 0x06, 0xab, 0xbb, 0x24, 0x93, 0x1e,
0xfa, 0x24, 0x3e, 0x52, 0xbd, 0xf9, 0x08, 0x1a, 0x5f, 0x44, 0xdc, 0x08, 0x36, 0xde, 0xe6, 0xfb,
0xe6, 0x1f, 0x3f, 0x38, 0xcb, 0x0d, 0xdb, 0x9a, 0x6d, 0xe5, 0x4d, 0x9c, 0x6b, 0xd6, 0x46, 0xd7,
0x96, 0xca, 0x7c, 0xe2, 0x2b, 0xc7, 0x4e, 0xc2, 0x5f, 0xf7, 0xe4, 0xb2, 0x28, 0x79, 0xd1, 0x98,
0x49, 0xe6, 0x9e, 0xe3, 0xc2, 0x15, 0x2e, 0x0e, 0x23, 0xa6, 0x79, 0x0c, 0x14, 0x20, 0x54, 0xdd,
0xea, 0xc5, 0x9b, 0x00, 0x98, 0xff, 0x1e, 0x7c, 0x98, 0xcb, 0x21, 0x80, 0xe5, 0x2c, 0x27, 0x5a,
0x25, 0x94, 0x62, 0xb4, 0xc5, 0x29, 0x5d, 0xa1, 0xe8, 0x71, 0x82, 0x3b, 0xf2, 0x00, 0xf6, 0x3b,
0xe6, 0xd2, 0xe3, 0xae, 0x1c, 0xc3, 0xd1, 0xda, 0xb9, 0x27, 0x6b, 0xbd, 0xad, 0x88, 0xaa, 0x94,
0xae, 0xe9, 0x0e, 0x41, 0x9e, 0xc2, 0x71, 0x5f, 0xcf, 0x28, 0x21, 0xbd, 0xf4, 0x0b, 0x8d, 0x03,
0x29, 0x61, 0x98, 0xb9, 0x97, 0xba, 0x59, 0x12, 0xad, 0xa6, 0x74, 0x43, 0x33, 0x1c, 0xfd, 0x73,
0xb7, 0x34, 0xc5, 0xb1, 0x3c, 0x84, 0xc1, 0xba, 0xfb, 0x65, 0x2c, 0x6b, 0x54, 0x3f, 0x22, 0xdb,
0x12, 0xe7, 0xf7, 0xa3, 0xcd, 0xa7, 0x8a, 0x36, 0xad, 0x12, 0xef, 0xad, 0x12, 0x1f, 0xad, 0x12,
0xaf, 0x5f, 0x2a, 0x32, 0x7b, 0x21, 0x68, 0xfa, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x89, 0x6f, 0x4c,
0x96, 0x43, 0x01, 0x00, 0x00,
}

View File

@ -0,0 +1,27 @@
syntax = "proto3";
package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
// differentiate between major or minor releases
// (possibly different APIs)
enum DatabaseID {
etcd__v2_3 = 0;
etcd__v3_1 = 1;
etcd__v3_2 = 2;
etcd__tip = 3;
zookeeper__r3_4_9 = 10;
zookeeper__r3_5_2_alpha = 11;
consul__v0_7_5 = 20;
consul__v0_8_0 = 21;
zetcd__beta = 30;
cetcd__beta = 40;
}

264
dbtesterpb/flag_cetcd.pb.go Normal file
View File

@ -0,0 +1,264 @@
// Code generated by protoc-gen-gogo.
// source: dbtesterpb/flag_cetcd.proto
// DO NOT EDIT!
package dbtesterpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Flag_Cetcd_Beta is cetcd-specific flags
// (https://github.com/coreos/cetcd).
type Flag_Cetcd_Beta struct {
}
func (m *Flag_Cetcd_Beta) Reset() { *m = Flag_Cetcd_Beta{} }
func (m *Flag_Cetcd_Beta) String() string { return proto.CompactTextString(m) }
func (*Flag_Cetcd_Beta) ProtoMessage() {}
func (*Flag_Cetcd_Beta) Descriptor() ([]byte, []int) { return fileDescriptorFlagCetcd, []int{0} }
func init() {
proto.RegisterType((*Flag_Cetcd_Beta)(nil), "dbtesterpb.flag__cetcd__beta")
}
func (m *Flag_Cetcd_Beta) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Flag_Cetcd_Beta) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
return i, nil
}
func encodeFixed64FlagCetcd(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32FlagCetcd(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintFlagCetcd(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Flag_Cetcd_Beta) Size() (n int) {
var l int
_ = l
return n
}
func sovFlagCetcd(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozFlagCetcd(x uint64) (n int) {
return sovFlagCetcd(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Flag_Cetcd_Beta) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagCetcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: flag__cetcd__beta: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: flag__cetcd__beta: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipFlagCetcd(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFlagCetcd
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipFlagCetcd(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagCetcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagCetcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagCetcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthFlagCetcd
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagCetcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipFlagCetcd(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthFlagCetcd = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowFlagCetcd = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("dbtesterpb/flag_cetcd.proto", fileDescriptorFlagCetcd) }
var fileDescriptorFlagCetcd = []byte{
// 130 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x49, 0x2a, 0x49,
0x2d, 0x2e, 0x49, 0x2d, 0x2a, 0x48, 0xd2, 0x4f, 0xcb, 0x49, 0x4c, 0x8f, 0x4f, 0x4e, 0x2d, 0x49,
0x4e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x48, 0x4a, 0xe9, 0xa6, 0x67, 0x96,
0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x24,
0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xaa, 0x24, 0xcc, 0x25, 0x08, 0x36, 0x0e,
0x62, 0x5e, 0x7c, 0x7c, 0x52, 0x6a, 0x49, 0xa2, 0x93, 0xc8, 0x89, 0x87, 0x72, 0x0c, 0x27, 0x1e,
0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x49,
0x6c, 0x60, 0x1d, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x7e, 0x95, 0x6e, 0x8b, 0x00,
0x00, 0x00,
}

View File

@ -0,0 +1,14 @@
syntax = "proto3";
package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
// Flag_Cetcd_Beta is cetcd-specific flags
// (https://github.com/coreos/cetcd).
message flag__cetcd__beta {
}

View File

@ -0,0 +1,347 @@
// Code generated by protoc-gen-gogo.
// source: dbtesterpb/flag_consul.proto
// DO NOT EDIT!
package dbtesterpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// See https://github.com/hashicorp/consul for more.
type Flag_Consul_V0_7_5 struct {
}
func (m *Flag_Consul_V0_7_5) Reset() { *m = Flag_Consul_V0_7_5{} }
func (m *Flag_Consul_V0_7_5) String() string { return proto.CompactTextString(m) }
func (*Flag_Consul_V0_7_5) ProtoMessage() {}
func (*Flag_Consul_V0_7_5) Descriptor() ([]byte, []int) { return fileDescriptorFlagConsul, []int{0} }
// See https://github.com/hashicorp/consul for more.
type Flag_Consul_V0_8_0 struct {
}
func (m *Flag_Consul_V0_8_0) Reset() { *m = Flag_Consul_V0_8_0{} }
func (m *Flag_Consul_V0_8_0) String() string { return proto.CompactTextString(m) }
func (*Flag_Consul_V0_8_0) ProtoMessage() {}
func (*Flag_Consul_V0_8_0) Descriptor() ([]byte, []int) { return fileDescriptorFlagConsul, []int{1} }
func init() {
proto.RegisterType((*Flag_Consul_V0_7_5)(nil), "dbtesterpb.flag__consul__v0_7_5")
proto.RegisterType((*Flag_Consul_V0_8_0)(nil), "dbtesterpb.flag__consul__v0_8_0")
}
func (m *Flag_Consul_V0_7_5) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Flag_Consul_V0_7_5) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
return i, nil
}
func (m *Flag_Consul_V0_8_0) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Flag_Consul_V0_8_0) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
return i, nil
}
func encodeFixed64FlagConsul(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32FlagConsul(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintFlagConsul(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Flag_Consul_V0_7_5) Size() (n int) {
var l int
_ = l
return n
}
func (m *Flag_Consul_V0_8_0) Size() (n int) {
var l int
_ = l
return n
}
func sovFlagConsul(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozFlagConsul(x uint64) (n int) {
return sovFlagConsul(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Flag_Consul_V0_7_5) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagConsul
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: flag__consul__v0_7_5: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: flag__consul__v0_7_5: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipFlagConsul(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFlagConsul
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Flag_Consul_V0_8_0) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagConsul
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: flag__consul__v0_8_0: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: flag__consul__v0_8_0: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipFlagConsul(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFlagConsul
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipFlagConsul(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagConsul
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagConsul
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagConsul
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthFlagConsul
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagConsul
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipFlagConsul(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthFlagConsul = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowFlagConsul = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("dbtesterpb/flag_consul.proto", fileDescriptorFlagConsul) }
var fileDescriptorFlagConsul = []byte{
// 138 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0x49, 0x2a, 0x49,
0x2d, 0x2e, 0x49, 0x2d, 0x2a, 0x48, 0xd2, 0x4f, 0xcb, 0x49, 0x4c, 0x8f, 0x4f, 0xce, 0xcf, 0x2b,
0x2e, 0xcd, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0xc8, 0x4a, 0xe9, 0xa6, 0x67,
0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95,
0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xaa, 0x24, 0xc6, 0x25, 0x02, 0x36,
0x0f, 0x6a, 0x60, 0x7c, 0x7c, 0x99, 0x41, 0xbc, 0x79, 0xbc, 0x29, 0x56, 0x71, 0x8b, 0x78, 0x03,
0x27, 0x91, 0x13, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1,
0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, 0x92, 0xd8, 0xc0, 0x86, 0x19, 0x03, 0x02, 0x00, 0x00,
0xff, 0xff, 0x93, 0xd4, 0x88, 0x26, 0xa7, 0x00, 0x00, 0x00,
}

View File

@ -0,0 +1,17 @@
syntax = "proto3";
package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
// See https://github.com/hashicorp/consul for more.
message flag__consul__v0_7_5 {
}
// See https://github.com/hashicorp/consul for more.
message flag__consul__v0_8_0 {
}

718
dbtesterpb/flag_etcd.pb.go Normal file
View File

@ -0,0 +1,718 @@
// Code generated by protoc-gen-gogo.
// source: dbtesterpb/flag_etcd.proto
// DO NOT EDIT!
package dbtesterpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// See https://github.com/coreos/etcd/blob/master/etcdmain/help.go for more.
type Flag_Etcd_V2_3 struct {
SnapshotCount int64 `protobuf:"varint,1,opt,name=SnapshotCount,proto3" json:"SnapshotCount,omitempty" yaml:"snapshot_count"`
}
func (m *Flag_Etcd_V2_3) Reset() { *m = Flag_Etcd_V2_3{} }
func (m *Flag_Etcd_V2_3) String() string { return proto.CompactTextString(m) }
func (*Flag_Etcd_V2_3) ProtoMessage() {}
func (*Flag_Etcd_V2_3) Descriptor() ([]byte, []int) { return fileDescriptorFlagEtcd, []int{0} }
// See https://github.com/coreos/etcd/blob/master/etcdmain/help.go for more.
type Flag_Etcd_V3_1 struct {
SnapshotCount int64 `protobuf:"varint,1,opt,name=SnapshotCount,proto3" json:"SnapshotCount,omitempty" yaml:"snapshot_count"`
QuotaSizeBytes int64 `protobuf:"varint,2,opt,name=QuotaSizeBytes,proto3" json:"QuotaSizeBytes,omitempty" yaml:"quota_size_bytes"`
}
func (m *Flag_Etcd_V3_1) Reset() { *m = Flag_Etcd_V3_1{} }
func (m *Flag_Etcd_V3_1) String() string { return proto.CompactTextString(m) }
func (*Flag_Etcd_V3_1) ProtoMessage() {}
func (*Flag_Etcd_V3_1) Descriptor() ([]byte, []int) { return fileDescriptorFlagEtcd, []int{1} }
// See https://github.com/coreos/etcd/blob/master/etcdmain/help.go for more.
type Flag_Etcd_V3_2 struct {
SnapshotCount int64 `protobuf:"varint,1,opt,name=SnapshotCount,proto3" json:"SnapshotCount,omitempty" yaml:"snapshot_count"`
QuotaSizeBytes int64 `protobuf:"varint,2,opt,name=QuotaSizeBytes,proto3" json:"QuotaSizeBytes,omitempty" yaml:"quota_size_bytes"`
}
func (m *Flag_Etcd_V3_2) Reset() { *m = Flag_Etcd_V3_2{} }
func (m *Flag_Etcd_V3_2) String() string { return proto.CompactTextString(m) }
func (*Flag_Etcd_V3_2) ProtoMessage() {}
func (*Flag_Etcd_V3_2) Descriptor() ([]byte, []int) { return fileDescriptorFlagEtcd, []int{2} }
// See https://github.com/coreos/etcd/blob/master/etcdmain/help.go for more.
type Flag_Etcd_Tip struct {
SnapshotCount int64 `protobuf:"varint,1,opt,name=SnapshotCount,proto3" json:"SnapshotCount,omitempty" yaml:"snapshot_count"`
QuotaSizeBytes int64 `protobuf:"varint,2,opt,name=QuotaSizeBytes,proto3" json:"QuotaSizeBytes,omitempty" yaml:"quota_size_bytes"`
}
func (m *Flag_Etcd_Tip) Reset() { *m = Flag_Etcd_Tip{} }
func (m *Flag_Etcd_Tip) String() string { return proto.CompactTextString(m) }
func (*Flag_Etcd_Tip) ProtoMessage() {}
func (*Flag_Etcd_Tip) Descriptor() ([]byte, []int) { return fileDescriptorFlagEtcd, []int{3} }
func init() {
proto.RegisterType((*Flag_Etcd_V2_3)(nil), "dbtesterpb.flag__etcd__v2_3")
proto.RegisterType((*Flag_Etcd_V3_1)(nil), "dbtesterpb.flag__etcd__v3_1")
proto.RegisterType((*Flag_Etcd_V3_2)(nil), "dbtesterpb.flag__etcd__v3_2")
proto.RegisterType((*Flag_Etcd_Tip)(nil), "dbtesterpb.flag__etcd__tip")
}
func (m *Flag_Etcd_V2_3) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Flag_Etcd_V2_3) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.SnapshotCount != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintFlagEtcd(dAtA, i, uint64(m.SnapshotCount))
}
return i, nil
}
func (m *Flag_Etcd_V3_1) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Flag_Etcd_V3_1) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.SnapshotCount != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintFlagEtcd(dAtA, i, uint64(m.SnapshotCount))
}
if m.QuotaSizeBytes != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintFlagEtcd(dAtA, i, uint64(m.QuotaSizeBytes))
}
return i, nil
}
func (m *Flag_Etcd_V3_2) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Flag_Etcd_V3_2) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.SnapshotCount != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintFlagEtcd(dAtA, i, uint64(m.SnapshotCount))
}
if m.QuotaSizeBytes != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintFlagEtcd(dAtA, i, uint64(m.QuotaSizeBytes))
}
return i, nil
}
func (m *Flag_Etcd_Tip) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Flag_Etcd_Tip) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.SnapshotCount != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintFlagEtcd(dAtA, i, uint64(m.SnapshotCount))
}
if m.QuotaSizeBytes != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintFlagEtcd(dAtA, i, uint64(m.QuotaSizeBytes))
}
return i, nil
}
func encodeFixed64FlagEtcd(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32FlagEtcd(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintFlagEtcd(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Flag_Etcd_V2_3) Size() (n int) {
var l int
_ = l
if m.SnapshotCount != 0 {
n += 1 + sovFlagEtcd(uint64(m.SnapshotCount))
}
return n
}
func (m *Flag_Etcd_V3_1) Size() (n int) {
var l int
_ = l
if m.SnapshotCount != 0 {
n += 1 + sovFlagEtcd(uint64(m.SnapshotCount))
}
if m.QuotaSizeBytes != 0 {
n += 1 + sovFlagEtcd(uint64(m.QuotaSizeBytes))
}
return n
}
func (m *Flag_Etcd_V3_2) Size() (n int) {
var l int
_ = l
if m.SnapshotCount != 0 {
n += 1 + sovFlagEtcd(uint64(m.SnapshotCount))
}
if m.QuotaSizeBytes != 0 {
n += 1 + sovFlagEtcd(uint64(m.QuotaSizeBytes))
}
return n
}
func (m *Flag_Etcd_Tip) Size() (n int) {
var l int
_ = l
if m.SnapshotCount != 0 {
n += 1 + sovFlagEtcd(uint64(m.SnapshotCount))
}
if m.QuotaSizeBytes != 0 {
n += 1 + sovFlagEtcd(uint64(m.QuotaSizeBytes))
}
return n
}
func sovFlagEtcd(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozFlagEtcd(x uint64) (n int) {
return sovFlagEtcd(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Flag_Etcd_V2_3) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: flag__etcd__v2_3: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: flag__etcd__v2_3: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotCount", wireType)
}
m.SnapshotCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SnapshotCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipFlagEtcd(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFlagEtcd
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Flag_Etcd_V3_1) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: flag__etcd__v3_1: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: flag__etcd__v3_1: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotCount", wireType)
}
m.SnapshotCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SnapshotCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field QuotaSizeBytes", wireType)
}
m.QuotaSizeBytes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.QuotaSizeBytes |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipFlagEtcd(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFlagEtcd
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Flag_Etcd_V3_2) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: flag__etcd__v3_2: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: flag__etcd__v3_2: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotCount", wireType)
}
m.SnapshotCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SnapshotCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field QuotaSizeBytes", wireType)
}
m.QuotaSizeBytes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.QuotaSizeBytes |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipFlagEtcd(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFlagEtcd
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Flag_Etcd_Tip) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: flag__etcd__tip: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: flag__etcd__tip: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SnapshotCount", wireType)
}
m.SnapshotCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SnapshotCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field QuotaSizeBytes", wireType)
}
m.QuotaSizeBytes = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.QuotaSizeBytes |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipFlagEtcd(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFlagEtcd
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipFlagEtcd(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthFlagEtcd
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagEtcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipFlagEtcd(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthFlagEtcd = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowFlagEtcd = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("dbtesterpb/flag_etcd.proto", fileDescriptorFlagEtcd) }
var fileDescriptorFlagEtcd = []byte{
// 251 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0x49, 0x2a, 0x49,
0x2d, 0x2e, 0x49, 0x2d, 0x2a, 0x48, 0xd2, 0x4f, 0xcb, 0x49, 0x4c, 0x8f, 0x4f, 0x2d, 0x49, 0x4e,
0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0xc8, 0x49, 0xe9, 0xa6, 0x67, 0x96, 0x64,
0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x24, 0x95,
0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xaa, 0x14, 0xcc, 0x25, 0x00, 0x36, 0x0d, 0x6c,
0x5c, 0x7c, 0x7c, 0x99, 0x51, 0xbc, 0xb1, 0x90, 0x3d, 0x17, 0x6f, 0x70, 0x5e, 0x62, 0x41, 0x71,
0x46, 0x7e, 0x89, 0x73, 0x7e, 0x69, 0x5e, 0x89, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb3, 0x93, 0xe4,
0xa7, 0x7b, 0xf2, 0xa2, 0x95, 0x89, 0xb9, 0x39, 0x56, 0x4a, 0xc5, 0x50, 0xe9, 0xf8, 0x64, 0x90,
0xbc, 0x52, 0x10, 0xaa, 0x7a, 0xa5, 0x19, 0x8c, 0x68, 0xa6, 0x1a, 0xc7, 0x1b, 0x52, 0x6c, 0xaa,
0x90, 0x33, 0x17, 0x5f, 0x60, 0x69, 0x7e, 0x49, 0x62, 0x70, 0x66, 0x55, 0xaa, 0x53, 0x65, 0x49,
0x6a, 0xb1, 0x04, 0x13, 0xd8, 0x04, 0xe9, 0x4f, 0xf7, 0xe4, 0xc5, 0x21, 0x26, 0x14, 0x82, 0xe4,
0xe3, 0x8b, 0x33, 0xab, 0x52, 0xe3, 0x93, 0x40, 0x2a, 0x94, 0x82, 0xd0, 0xb4, 0x60, 0x73, 0x9a,
0xd1, 0x20, 0x71, 0xda, 0x74, 0x46, 0x2e, 0x7e, 0x64, 0xa7, 0x95, 0x64, 0x16, 0x0c, 0x0e, 0x97,
0x39, 0x89, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f,
0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x90, 0xc4, 0x06, 0x4e, 0x41, 0xc6, 0x80, 0x00, 0x00,
0x00, 0xff, 0xff, 0x5c, 0xec, 0xd8, 0x68, 0x9a, 0x02, 0x00, 0x00,
}

View File

@ -0,0 +1,32 @@
syntax = "proto3";
package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
// See https://github.com/coreos/etcd/blob/master/etcdmain/help.go for more.
message flag__etcd__v2_3 {
int64 SnapshotCount = 1 [(gogoproto.moretags) = "yaml:\"snapshot_count\""];
}
// See https://github.com/coreos/etcd/blob/master/etcdmain/help.go for more.
message flag__etcd__v3_1 {
int64 SnapshotCount = 1 [(gogoproto.moretags) = "yaml:\"snapshot_count\""];
int64 QuotaSizeBytes = 2 [(gogoproto.moretags) = "yaml:\"quota_size_bytes\""];
}
// See https://github.com/coreos/etcd/blob/master/etcdmain/help.go for more.
message flag__etcd__v3_2 {
int64 SnapshotCount = 1 [(gogoproto.moretags) = "yaml:\"snapshot_count\""];
int64 QuotaSizeBytes = 2 [(gogoproto.moretags) = "yaml:\"quota_size_bytes\""];
}
// See https://github.com/coreos/etcd/blob/master/etcdmain/help.go for more.
message flag__etcd__tip {
int64 SnapshotCount = 1 [(gogoproto.moretags) = "yaml:\"snapshot_count\""];
int64 QuotaSizeBytes = 2 [(gogoproto.moretags) = "yaml:\"quota_size_bytes\""];
}

264
dbtesterpb/flag_zetcd.pb.go Normal file
View File

@ -0,0 +1,264 @@
// Code generated by protoc-gen-gogo.
// source: dbtesterpb/flag_zetcd.proto
// DO NOT EDIT!
package dbtesterpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// Flag_Zetcd_Beta is zetcd-specific flags
// (https://github.com/coreos/zetcd).
type Flag_Zetcd_Beta struct {
}
func (m *Flag_Zetcd_Beta) Reset() { *m = Flag_Zetcd_Beta{} }
func (m *Flag_Zetcd_Beta) String() string { return proto.CompactTextString(m) }
func (*Flag_Zetcd_Beta) ProtoMessage() {}
func (*Flag_Zetcd_Beta) Descriptor() ([]byte, []int) { return fileDescriptorFlagZetcd, []int{0} }
func init() {
proto.RegisterType((*Flag_Zetcd_Beta)(nil), "dbtesterpb.flag__zetcd__beta")
}
func (m *Flag_Zetcd_Beta) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Flag_Zetcd_Beta) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
return i, nil
}
func encodeFixed64FlagZetcd(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
dAtA[offset+4] = uint8(v >> 32)
dAtA[offset+5] = uint8(v >> 40)
dAtA[offset+6] = uint8(v >> 48)
dAtA[offset+7] = uint8(v >> 56)
return offset + 8
}
func encodeFixed32FlagZetcd(dAtA []byte, offset int, v uint32) int {
dAtA[offset] = uint8(v)
dAtA[offset+1] = uint8(v >> 8)
dAtA[offset+2] = uint8(v >> 16)
dAtA[offset+3] = uint8(v >> 24)
return offset + 4
}
func encodeVarintFlagZetcd(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *Flag_Zetcd_Beta) Size() (n int) {
var l int
_ = l
return n
}
func sovFlagZetcd(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozFlagZetcd(x uint64) (n int) {
return sovFlagZetcd(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *Flag_Zetcd_Beta) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFlagZetcd
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: flag__zetcd__beta: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: flag__zetcd__beta: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipFlagZetcd(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFlagZetcd
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipFlagZetcd(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagZetcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagZetcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagZetcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthFlagZetcd
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFlagZetcd
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipFlagZetcd(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthFlagZetcd = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowFlagZetcd = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("dbtesterpb/flag_zetcd.proto", fileDescriptorFlagZetcd) }
var fileDescriptorFlagZetcd = []byte{
// 130 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x49, 0x2a, 0x49,
0x2d, 0x2e, 0x49, 0x2d, 0x2a, 0x48, 0xd2, 0x4f, 0xcb, 0x49, 0x4c, 0x8f, 0xaf, 0x4a, 0x2d, 0x49,
0x4e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x48, 0x4a, 0xe9, 0xa6, 0x67, 0x96,
0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x24,
0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xaa, 0x24, 0xcc, 0x25, 0x08, 0x36, 0x0e,
0x62, 0x5e, 0x7c, 0x7c, 0x52, 0x6a, 0x49, 0xa2, 0x93, 0xc8, 0x89, 0x87, 0x72, 0x0c, 0x27, 0x1e,
0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x49,
0x6c, 0x60, 0x1d, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7e, 0xb7, 0x0d, 0x03, 0x8b, 0x00,
0x00, 0x00,
}

View File

@ -0,0 +1,14 @@
syntax = "proto3";
package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
// Flag_Zetcd_Beta is zetcd-specific flags
// (https://github.com/coreos/zetcd).
message flag__zetcd__beta {
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
syntax = "proto3";
package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
message flag__zookeeper__r3_4_9 {
// JavaDJuteMaxBuffer is for '-Djute.maxbuffer' flag.
uint64 JavaDJuteMaxBuffer = 1 [(gogoproto.moretags) = "yaml:\"java_d_jute_max_buffer\""];
// JavaXms is for '-Xms' flag.
string JavaXms = 2 [(gogoproto.moretags) = "yaml:\"java_xms\""];
// JavaXmx is for '-Xmx' flag.
string JavaXmx = 3 [(gogoproto.moretags) = "yaml:\"java_xmx\""];
uint32 myID = 100;
int64 ClientPort = 101;
// See http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html for more.
int64 TickTime = 102 [(gogoproto.moretags) = "yaml:\"tick_time\""];
int64 InitLimit = 103 [(gogoproto.moretags) = "yaml:\"init_limit\""];
int64 SyncLimit = 104 [(gogoproto.moretags) = "yaml:\"sync_limit\""];
int64 SnapCount = 105 [(gogoproto.moretags) = "yaml:\"snap_count\""];
int64 MaxClientConnections = 106 [(gogoproto.moretags) = "yaml:\"max_client_connections\""];
}
message flag__zookeeper__r3_5_2_alpha {
// JavaDJuteMaxBuffer is for '-Djute.maxbuffer' flag.
uint64 JavaDJuteMaxBuffer = 1 [(gogoproto.moretags) = "yaml:\"java_d_jute_max_buffer\""];
// JavaXms is for '-Xms' flag.
string JavaXms = 2 [(gogoproto.moretags) = "yaml:\"java_xms\""];
// JavaXmx is for '-Xmx' flag.
string JavaXmx = 3 [(gogoproto.moretags) = "yaml:\"java_xmx\""];
uint32 myID = 100;
int64 ClientPort = 101;
// See http://zookeeper.apache.org/doc/trunk/zookeeperAdmin.html for more.
int64 TickTime = 102 [(gogoproto.moretags) = "yaml:\"tick_time\""];
int64 InitLimit = 103 [(gogoproto.moretags) = "yaml:\"init_limit\""];
int64 SyncLimit = 104 [(gogoproto.moretags) = "yaml:\"sync_limit\""];
int64 SnapCount = 105 [(gogoproto.moretags) = "yaml:\"snap_count\""];
int64 MaxClientConnections = 106 [(gogoproto.moretags) = "yaml:\"max_client_connections\""];
}

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,16 @@ package dbtesterpb;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "dbtesterpb/database_id.proto";
import "dbtesterpb/flag_etcd.proto";
import "dbtesterpb/flag_zookeeper.proto";
import "dbtesterpb/flag_consul.proto";
import "dbtesterpb/flag_zetcd.proto";
import "dbtesterpb/flag_cetcd.proto";
import "dbtesterpb/config_client_machine.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
@ -12,59 +22,45 @@ service Transporter {
rpc Transfer(Request) returns (Response) {}
}
message Request {
enum Operation {
enum Operation {
Start = 0;
Stop = 1;
Heartbeat = 2;
}
enum Database {
etcdv2 = 0;
etcdv3 = 1;
zookeeper = 2;
consul = 3;
zetcd = 4;
cetcd = 5;
}
message Control {
string googleCloudProjectName = 1;
string googleCloudStorageKey = 2;
string googleCloudStorageBucketName = 3;
string googleCloudStorageSubDirectory = 4;
}
message Etcdv3 {
int64 snapCount = 1;
int64 quotaSizeBytes = 2;
}
message Zookeeper {
uint32 myID = 1;
int64 tickTime = 2;
int64 clientPort = 3;
int64 initLimit = 4;
int64 syncLimit = 5;
int64 snapCount = 6;
int64 maxClientConnections = 7;
}
}
Operation operation = 1;
bool triggerLogUpload = 2;
Database databaseID = 3;
string databaseTag = 4;
message Request {
Operation Operation = 1;
bool TriggerLogUpload = 2;
string peerIPsString = 5;
uint32 ipIndex = 6;
DatabaseID DatabaseID = 3;
string DatabaseTag = 4;
int64 currentClientNumber = 7;
string PeerIPsString = 5;
uint32 IPIndex = 6;
Control control = 8;
Etcdv3 etcdv3Config = 9;
Zookeeper zookeeperConfig = 10;
int64 CurrentClientNumber = 7;
ConfigClientMachineInitial ConfigClientMachineInitial = 8;
flag__etcd__v2_3 flag__etcd__v2_3 = 100;
flag__etcd__v3_1 flag__etcd__v3_1 = 101;
flag__etcd__v3_2 flag__etcd__v3_2 = 102;
flag__etcd__tip flag__etcd__tip = 103;
flag__zookeeper__r3_4_9 flag__zookeeper__r3_4_9 = 200;
flag__zookeeper__r3_5_2_alpha flag__zookeeper__r3_5_2_alpha = 201;
flag__consul__v0_7_5 flag__consul__v0_7_5 = 300;
flag__consul__v0_8_0 flag__consul__v0_8_0 = 301;
flag__cetcd__beta flag__cetcd__beta = 400;
flag__zetcd__beta flag__zetcd__beta = 500;
}
message Response {
bool success = 1;
bool Success = 1;
// DiskSpaceUsageBytes is the data size of the database on disk in bytes.
// It measures after database is requested to stop.
int64 diskSpaceUsageBytes = 2;
int64 DiskSpaceUsageBytes = 2;
}

93
dbtesterpb/util.go Normal file
View File

@ -0,0 +1,93 @@
// Copyright 2017 CoreOS, Inc.
//
// 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.
package dbtesterpb
import (
"image/color"
"github.com/gonum/plot/plotutil"
)
// IsValidDatabaseID returns false if the database id is not supported.
func IsValidDatabaseID(id string) bool {
_, ok := DatabaseID_value[id]
return ok
}
func GetRGBI(databaseID string, i int) color.Color {
switch databaseID {
case "etcd__v2_3":
return color.RGBA{218, 97, 229, 255} // purple
case "etcd__v3_1":
return color.RGBA{24, 90, 169, 255} // blue
case "etcd__v3_2":
return color.RGBA{63, 81, 181, 255} // indigo
case "etcd__tip":
return color.RGBA{0, 229, 255, 255} // cyan
case "zookeeper__r3_5_2_alpha":
return color.RGBA{38, 169, 24, 255} // green
case "consul__v0_7_5":
return color.RGBA{198, 53, 53, 255} // red
case "zetcd__beta":
return color.RGBA{251, 206, 0, 255} // yellow
case "cetcd__beta":
return color.RGBA{205, 220, 57, 255} // lime
}
return plotutil.Color(i)
}
func GetRGBII(databaseID string, i int) color.Color {
switch databaseID {
case "etcd__v2_3":
return color.RGBA{229, 212, 231, 255} // light-purple
case "etcd__v3_1":
return color.RGBA{129, 212, 247, 255} // light-blue
case "etcd__v3_2":
return color.RGBA{159, 168, 218, 255} // light-indigo
case "etcd__tip":
return color.RGBA{132, 255, 255, 255} // light-cyan
case "zookeeper__r3_5_2_alpha":
return color.RGBA{129, 247, 152, 255} // light-green
case "consul__v0_7_5":
return color.RGBA{247, 156, 156, 255} // light-red
case "zetcd__beta":
return color.RGBA{245, 247, 166, 255} // light-yellow
case "cetcd__beta":
return color.RGBA{238, 255, 65, 255} // light-lime
}
return plotutil.Color(i)
}
func GetRGBIII(databaseID string, i int) color.Color {
switch databaseID {
case "etcd__v2_3":
return color.RGBA{165, 8, 180, 255} // deep-purple
case "etcd__v3_1":
return color.RGBA{37, 29, 191, 255} // deep-blue
case "etcd__v3_2":
return color.RGBA{26, 35, 126, 255} // deep-indigo
case "etcd__tip":
return color.RGBA{0, 96, 100, 255} // deep-cyan
case "zookeeper__r3_5_2_alpha":
return color.RGBA{7, 64, 35, 255} // deep-green
case "consul__v0_7_5":
return color.RGBA{212, 8, 46, 255} // deep-red
case "zetcd__beta":
return color.RGBA{229, 255, 0, 255} // deep-yellow
case "cetcd__beta":
return color.RGBA{205, 220, 57, 255} // deep-lime
}
return plotutil.Color(i)
}