rpcpb

package
v3.3.0-rc.0.0...-d8dc29e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package rpcpb is a generated protocol buffer package.

It is generated from these files:

rpcpb/rpc.proto

It has these top-level messages:

Etcd
Member
Tester
Request
Response

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRpc   = fmt.Errorf("proto: integer overflow")
)
View Source
var FailureCase_name = map[int32]string{
	0:   "KILL_ONE_FOLLOWER",
	1:   "KILL_LEADER",
	2:   "KILL_ONE_FOLLOWER_FOR_LONG",
	3:   "KILL_LEADER_FOR_LONG",
	4:   "KILL_QUORUM",
	5:   "KILL_ALL",
	6:   "BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER",
	7:   "BLACKHOLE_PEER_PORT_TX_RX_LEADER",
	8:   "BLACKHOLE_PEER_PORT_TX_RX_ALL",
	9:   "DELAY_PEER_PORT_TX_RX_ONE_FOLLOWER",
	10:  "DELAY_PEER_PORT_TX_RX_LEADER",
	11:  "DELAY_PEER_PORT_TX_RX_ALL",
	100: "FAILPOINTS",
	200: "NO_FAIL",
	300: "EXTERNAL",
}
View Source
var FailureCase_value = map[string]int32{
	"KILL_ONE_FOLLOWER":                      0,
	"KILL_LEADER":                            1,
	"KILL_ONE_FOLLOWER_FOR_LONG":             2,
	"KILL_LEADER_FOR_LONG":                   3,
	"KILL_QUORUM":                            4,
	"KILL_ALL":                               5,
	"BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER": 6,
	"BLACKHOLE_PEER_PORT_TX_RX_LEADER":       7,
	"BLACKHOLE_PEER_PORT_TX_RX_ALL":          8,
	"DELAY_PEER_PORT_TX_RX_ONE_FOLLOWER":     9,
	"DELAY_PEER_PORT_TX_RX_LEADER":           10,
	"DELAY_PEER_PORT_TX_RX_ALL":              11,
	"FAILPOINTS":                             100,
	"NO_FAIL":                                200,
	"EXTERNAL":                               300,
}
View Source
var Operation_name = map[int32]string{
	0:   "NotStarted",
	1:   "InitialStartEtcd",
	2:   "RestartEtcd",
	3:   "KillEtcd",
	4:   "FailArchive",
	5:   "DestroyEtcdAgent",
	100: "BlackholePeerPortTxRx",
	101: "UnblackholePeerPortTxRx",
	102: "DelayPeerPortTxRx",
	103: "UndelayPeerPortTxRx",
}
View Source
var Operation_value = map[string]int32{
	"NotStarted":              0,
	"InitialStartEtcd":        1,
	"RestartEtcd":             2,
	"KillEtcd":                3,
	"FailArchive":             4,
	"DestroyEtcdAgent":        5,
	"BlackholePeerPortTxRx":   100,
	"UnblackholePeerPortTxRx": 101,
	"DelayPeerPortTxRx":       102,
	"UndelayPeerPortTxRx":     103,
}
View Source
var StressType_name = map[int32]string{
	0: "KV",
	1: "LEASE",
	2: "NO_STRESS",
	3: "ELECTION_RUNNER",
	4: "WATCH_RUNNER",
	5: "LOCK_RACER_RUNNER",
	6: "LEASE_RUNNER",
}
View Source
var StressType_value = map[string]int32{
	"KV":                0,
	"LEASE":             1,
	"NO_STRESS":         2,
	"ELECTION_RUNNER":   3,
	"WATCH_RUNNER":      4,
	"LOCK_RACER_RUNNER": 5,
	"LEASE_RUNNER":      6,
}

Functions

func RegisterTransportServer

func RegisterTransportServer(s *grpc.Server, srv TransportServer)

Types

type Etcd

type Etcd struct {
	Name                     string   `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty" yaml:"name"`
	DataDir                  string   `protobuf:"bytes,2,opt,name=DataDir,proto3" json:"DataDir,omitempty" yaml:"data-dir"`
	WALDir                   string   `protobuf:"bytes,3,opt,name=WALDir,proto3" json:"WALDir,omitempty" yaml:"wal-dir"`
	ListenClientURLs         []string `protobuf:"bytes,4,rep,name=ListenClientURLs" json:"ListenClientURLs,omitempty" yaml:"listen-client-urls"`
	AdvertiseClientURLs      []string `protobuf:"bytes,5,rep,name=AdvertiseClientURLs" json:"AdvertiseClientURLs,omitempty" yaml:"advertise-client-urls"`
	ListenPeerURLs           []string `protobuf:"bytes,6,rep,name=ListenPeerURLs" json:"ListenPeerURLs,omitempty" yaml:"listen-peer-urls"`
	InitialAdvertisePeerURLs []string `` /* 129-byte string literal not displayed */
	InitialCluster           string   `protobuf:"bytes,8,opt,name=InitialCluster,proto3" json:"InitialCluster,omitempty" yaml:"initial-cluster"`
	InitialClusterState      string   `protobuf:"bytes,9,opt,name=InitialClusterState,proto3" json:"InitialClusterState,omitempty" yaml:"initial-cluster-state"`
	InitialClusterToken      string   `protobuf:"bytes,10,opt,name=InitialClusterToken,proto3" json:"InitialClusterToken,omitempty" yaml:"initial-cluster-token"`
	SnapshotCount            int64    `protobuf:"varint,11,opt,name=SnapshotCount,proto3" json:"SnapshotCount,omitempty" yaml:"snapshot-count"`
	QuotaBackendBytes        int64    `protobuf:"varint,12,opt,name=QuotaBackendBytes,proto3" json:"QuotaBackendBytes,omitempty" yaml:"quota-backend-bytes"`
	PreVote                  bool     `protobuf:"varint,13,opt,name=PreVote,proto3" json:"PreVote,omitempty" yaml:"pre-vote"`
	InitialCorruptCheck      bool     `protobuf:"varint,14,opt,name=InitialCorruptCheck,proto3" json:"InitialCorruptCheck,omitempty" yaml:"initial-corrupt-check"`
}

func (*Etcd) Descriptor

func (*Etcd) Descriptor() ([]byte, []int)

func (*Etcd) Flags

func (cfg *Etcd) Flags() (fs []string)

Flags returns etcd flags in string slice.

func (*Etcd) Marshal

func (m *Etcd) Marshal() (dAtA []byte, err error)

func (*Etcd) MarshalTo

func (m *Etcd) MarshalTo(dAtA []byte) (int, error)

func (*Etcd) ProtoMessage

func (*Etcd) ProtoMessage()

func (*Etcd) Reset

func (m *Etcd) Reset()

func (*Etcd) Size

func (m *Etcd) Size() (n int)

func (*Etcd) String

func (m *Etcd) String() string

func (*Etcd) Unmarshal

func (m *Etcd) Unmarshal(dAtA []byte) error

type FailureCase

type FailureCase int32
const (
	FailureCase_KILL_ONE_FOLLOWER                      FailureCase = 0
	FailureCase_KILL_LEADER                            FailureCase = 1
	FailureCase_KILL_ONE_FOLLOWER_FOR_LONG             FailureCase = 2
	FailureCase_KILL_LEADER_FOR_LONG                   FailureCase = 3
	FailureCase_KILL_QUORUM                            FailureCase = 4
	FailureCase_KILL_ALL                               FailureCase = 5
	FailureCase_BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER FailureCase = 6
	FailureCase_BLACKHOLE_PEER_PORT_TX_RX_LEADER       FailureCase = 7
	FailureCase_BLACKHOLE_PEER_PORT_TX_RX_ALL          FailureCase = 8
	FailureCase_DELAY_PEER_PORT_TX_RX_ONE_FOLLOWER     FailureCase = 9
	FailureCase_DELAY_PEER_PORT_TX_RX_LEADER           FailureCase = 10
	FailureCase_DELAY_PEER_PORT_TX_RX_ALL              FailureCase = 11
	FailureCase_FAILPOINTS                             FailureCase = 100
	FailureCase_NO_FAIL                                FailureCase = 200
	FailureCase_EXTERNAL                               FailureCase = 300
)

func (FailureCase) EnumDescriptor

func (FailureCase) EnumDescriptor() ([]byte, []int)

func (FailureCase) String

func (x FailureCase) String() string

type Member

type Member struct {
	// EtcdExecPath is the executable etcd binary path in agent server.
	EtcdExecPath string `protobuf:"bytes,1,opt,name=EtcdExecPath,proto3" json:"EtcdExecPath,omitempty" yaml:"etcd-exec-path"`
	// AgentAddr is the agent HTTP server address.
	AgentAddr string `protobuf:"bytes,11,opt,name=AgentAddr,proto3" json:"AgentAddr,omitempty" yaml:"agent-addr"`
	// FailpointHTTPAddr is the agent's failpoints HTTP server address.
	FailpointHTTPAddr string `protobuf:"bytes,12,opt,name=FailpointHTTPAddr,proto3" json:"FailpointHTTPAddr,omitempty" yaml:"failpoint-http-addr"`
	// BaseDir is the base directory where all logs and etcd data are stored.
	BaseDir string `protobuf:"bytes,101,opt,name=BaseDir,proto3" json:"BaseDir,omitempty" yaml:"base-dir"`
	// EtcdLogPath is the log file to store current etcd server logs.
	EtcdLogPath string `protobuf:"bytes,102,opt,name=EtcdLogPath,proto3" json:"EtcdLogPath,omitempty" yaml:"etcd-log-path"`
	// EtcdClientTLS is true when client traffic needs to be encrypted.
	EtcdClientTLS bool `protobuf:"varint,201,opt,name=EtcdClientTLS,proto3" json:"EtcdClientTLS,omitempty" yaml:"etcd-client-tls"`
	// EtcdClientProxy is true when client traffic needs to be proxied.
	// If true, listen client URL port must be different than advertise client URL port.
	EtcdClientProxy bool `protobuf:"varint,202,opt,name=EtcdClientProxy,proto3" json:"EtcdClientProxy,omitempty" yaml:"etcd-client-proxy"`
	// EtcdPeerProxy is true when peer traffic needs to be proxied.
	// If true, listen peer URL port must be different than advertise peer URL port.
	EtcdPeerProxy bool `protobuf:"varint,203,opt,name=EtcdPeerProxy,proto3" json:"EtcdPeerProxy,omitempty" yaml:"etcd-peer-proxy"`
	// EtcdClientEndpoint is the etcd client endpoint.
	EtcdClientEndpoint string `protobuf:"bytes,204,opt,name=EtcdClientEndpoint,proto3" json:"EtcdClientEndpoint,omitempty" yaml:"etcd-client-endpoint"`
	// Etcd defines etcd binary configuration flags.
	Etcd *Etcd `protobuf:"bytes,301,opt,name=Etcd" json:"Etcd,omitempty" yaml:"etcd"`
}

func (*Member) CheckCompact

func (m *Member) CheckCompact(rev int64) error

CheckCompact ensures that historical data before given revision has been compacted.

func (*Member) Compact

func (m *Member) Compact(rev int64, timeout time.Duration) error

Compact compacts member storage with given revision. It blocks until it's physically done.

func (*Member) CreateEtcdClient

func (m *Member) CreateEtcdClient(opts ...grpc.DialOption) (*clientv3.Client, error)

CreateEtcdClient creates a client from member.

func (*Member) Defrag

func (m *Member) Defrag() error

Defrag runs defragmentation on this member.

func (*Member) Descriptor

func (*Member) Descriptor() ([]byte, []int)

func (*Member) DialEtcdGRPCServer

func (m *Member) DialEtcdGRPCServer(opts ...grpc.DialOption) (*grpc.ClientConn, error)

DialEtcdGRPCServer creates a raw gRPC connection to an etcd member.

func (*Member) IsLeader

func (m *Member) IsLeader() (bool, error)

IsLeader returns true if this member is the current cluster leader.

func (*Member) Marshal

func (m *Member) Marshal() (dAtA []byte, err error)

func (*Member) MarshalTo

func (m *Member) MarshalTo(dAtA []byte) (int, error)

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) Reset

func (m *Member) Reset()

func (*Member) Rev

func (m *Member) Rev(ctx context.Context) (int64, error)

Rev fetches current revision on this member.

func (*Member) RevHash

func (m *Member) RevHash() (int64, int64, error)

RevHash fetches current revision and hash on this member.

func (*Member) Size

func (m *Member) Size() (n int)

func (*Member) String

func (m *Member) String() string

func (*Member) Unmarshal

func (m *Member) Unmarshal(dAtA []byte) error

func (*Member) WriteHealthKey

func (m *Member) WriteHealthKey() error

WriteHealthKey writes a health key to this member.

type Operation

type Operation int32
const (
	Operation_NotStarted Operation = 0
	// InitialStartEtcd is only called to start etcd very first time.
	Operation_InitialStartEtcd Operation = 1
	// RestartEtcd is sent to restart killed etcd.
	Operation_RestartEtcd Operation = 2
	// KillEtcd pauses etcd process while keeping data directories
	// and previous etcd configurations.
	Operation_KillEtcd Operation = 3
	// FailArchive is sent when consistency check failed,
	// thus need to archive etcd data directories.
	Operation_FailArchive Operation = 4
	// DestroyEtcdAgent destroys etcd process, etcd data, and agent server.
	Operation_DestroyEtcdAgent        Operation = 5
	Operation_BlackholePeerPortTxRx   Operation = 100
	Operation_UnblackholePeerPortTxRx Operation = 101
	Operation_DelayPeerPortTxRx       Operation = 102
	Operation_UndelayPeerPortTxRx     Operation = 103
)

func (Operation) EnumDescriptor

func (Operation) EnumDescriptor() ([]byte, []int)

func (Operation) String

func (x Operation) String() string

type Request

type Request struct {
	Operation Operation `protobuf:"varint,1,opt,name=Operation,proto3,enum=rpcpb.Operation" json:"Operation,omitempty"`
	Member    *Member   `protobuf:"bytes,2,opt,name=Member" json:"Member,omitempty"`
	Tester    *Tester   `protobuf:"bytes,3,opt,name=Tester" json:"Tester,omitempty"`
}

func (*Request) Descriptor

func (*Request) Descriptor() ([]byte, []int)

func (*Request) Marshal

func (m *Request) Marshal() (dAtA []byte, err error)

func (*Request) MarshalTo

func (m *Request) MarshalTo(dAtA []byte) (int, error)

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) Size

func (m *Request) Size() (n int)

func (*Request) String

func (m *Request) String() string

func (*Request) Unmarshal

func (m *Request) Unmarshal(dAtA []byte) error

type Response

type Response struct {
	Success bool   `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"`
	Status  string `protobuf:"bytes,2,opt,name=Status,proto3" json:"Status,omitempty"`
}

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

func (m *Response) Size() (n int)

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

type StressType

type StressType int32
const (
	StressType_KV                StressType = 0
	StressType_LEASE             StressType = 1
	StressType_NO_STRESS         StressType = 2
	StressType_ELECTION_RUNNER   StressType = 3
	StressType_WATCH_RUNNER      StressType = 4
	StressType_LOCK_RACER_RUNNER StressType = 5
	StressType_LEASE_RUNNER      StressType = 6
)

func (StressType) EnumDescriptor

func (StressType) EnumDescriptor() ([]byte, []int)

func (StressType) String

func (x StressType) String() string

type Tester

type Tester struct {
	TesterNetwork string `protobuf:"bytes,1,opt,name=TesterNetwork,proto3" json:"TesterNetwork,omitempty" yaml:"tester-network"`
	TesterAddr    string `protobuf:"bytes,2,opt,name=TesterAddr,proto3" json:"TesterAddr,omitempty" yaml:"tester-addr"`
	// DelayLatencyMsRv is the delay latency in milliseconds,
	// to inject to simulated slow network.
	DelayLatencyMs uint32 `protobuf:"varint,11,opt,name=DelayLatencyMs,proto3" json:"DelayLatencyMs,omitempty" yaml:"delay-latency-ms"`
	// DelayLatencyMsRv is the delay latency random variable in milliseconds.
	DelayLatencyMsRv uint32 `protobuf:"varint,12,opt,name=DelayLatencyMsRv,proto3" json:"DelayLatencyMsRv,omitempty" yaml:"delay-latency-ms-rv"`
	// RoundLimit is the limit of rounds to run failure set (-1 to run without limits).
	RoundLimit int32 `protobuf:"varint,21,opt,name=RoundLimit,proto3" json:"RoundLimit,omitempty" yaml:"round-limit"`
	// ExitOnFailure is true, then exit tester on first failure.
	ExitOnFailure bool `protobuf:"varint,22,opt,name=ExitOnFailure,proto3" json:"ExitOnFailure,omitempty" yaml:"exit-on-failure"`
	// ConsistencyCheck is true to check consistency (revision, hash).
	ConsistencyCheck bool `protobuf:"varint,23,opt,name=ConsistencyCheck,proto3" json:"ConsistencyCheck,omitempty" yaml:"consistency-check"`
	// EnablePprof is true to enable profiler.
	EnablePprof bool `protobuf:"varint,24,opt,name=EnablePprof,proto3" json:"EnablePprof,omitempty" yaml:"enable-pprof"`
	// FailureCases is the selected test cases to schedule.
	// If empty, run all failure cases.
	// TODO: support no-op
	FailureCases []string `protobuf:"bytes,31,rep,name=FailureCases" json:"FailureCases,omitempty" yaml:"failure-cases"`
	// FailureShuffle is true to randomize failure injecting order.
	FailureShuffle bool `protobuf:"varint,32,opt,name=FailureShuffle,proto3" json:"FailureShuffle,omitempty" yaml:"failure-shuffle"`
	// FailpointCommands is the list of "gofail" commands (e.g. panic("etcd-tester"),1*sleep(1000)).
	FailpointCommands []string `protobuf:"bytes,33,rep,name=FailpointCommands" json:"FailpointCommands,omitempty" yaml:"failpoint-commands"`
	// RunnerExecPath is a path of etcd-runner binary.
	RunnerExecPath string `protobuf:"bytes,41,opt,name=RunnerExecPath,proto3" json:"RunnerExecPath,omitempty" yaml:"runner-exec-path"`
	// ExternalExecPath is a path of script for enabling/disabling an external fault injector.
	ExternalExecPath string `protobuf:"bytes,42,opt,name=ExternalExecPath,proto3" json:"ExternalExecPath,omitempty" yaml:"external-exec-path"`
	// StressTypes is the list of stresser names:
	// keys, lease, nop, election-runner, watch-runner, lock-racer-runner, lease-runner.
	StressTypes []string `protobuf:"bytes,101,rep,name=StressTypes" json:"StressTypes,omitempty" yaml:"stress-types"`
	// StressKeySize is the size of each small key written into etcd.
	StressKeySize int32 `protobuf:"varint,102,opt,name=StressKeySize,proto3" json:"StressKeySize,omitempty" yaml:"stress-key-size"`
	// StressKeySizeLarge is the size of each large key written into etcd.
	StressKeySizeLarge int32 `protobuf:"varint,103,opt,name=StressKeySizeLarge,proto3" json:"StressKeySizeLarge,omitempty" yaml:"stress-key-size-large"`
	// StressKeySuffixRange is the count of key range written into etcd.
	// Stress keys are created with "fmt.Sprintf("foo%016x", rand.Intn(keySuffixRange)".
	StressKeySuffixRange int32 `` /* 127-byte string literal not displayed */
	// StressKeySuffixRangeTxn is the count of key range written into etcd txn (max 100).
	// Stress keys are created with "fmt.Sprintf("/k%03d", i)".
	StressKeySuffixRangeTxn int32 `` /* 137-byte string literal not displayed */
	// StressKeyTxnOps is the number of operations per a transaction (max 64).
	StressKeyTxnOps int32 `protobuf:"varint,106,opt,name=StressKeyTxnOps,proto3" json:"StressKeyTxnOps,omitempty" yaml:"stress-key-txn-ops"`
	// StressQPS is the maximum number of stresser requests per second.
	StressQPS int32 `protobuf:"varint,107,opt,name=StressQPS,proto3" json:"StressQPS,omitempty" yaml:"stress-qps"`
}

func (*Tester) Descriptor

func (*Tester) Descriptor() ([]byte, []int)

func (*Tester) Marshal

func (m *Tester) Marshal() (dAtA []byte, err error)

func (*Tester) MarshalTo

func (m *Tester) MarshalTo(dAtA []byte) (int, error)

func (*Tester) ProtoMessage

func (*Tester) ProtoMessage()

func (*Tester) Reset

func (m *Tester) Reset()

func (*Tester) Size

func (m *Tester) Size() (n int)

func (*Tester) String

func (m *Tester) String() string

func (*Tester) Unmarshal

func (m *Tester) Unmarshal(dAtA []byte) error

type TransportClient

type TransportClient interface {
	Transport(ctx context.Context, opts ...grpc.CallOption) (Transport_TransportClient, error)
}

func NewTransportClient

func NewTransportClient(cc *grpc.ClientConn) TransportClient

type TransportServer

type TransportServer interface {
	Transport(Transport_TransportServer) error
}

type Transport_TransportClient

type Transport_TransportClient interface {
	Send(*Request) error
	Recv() (*Response, error)
	grpc.ClientStream
}

type Transport_TransportServer

type Transport_TransportServer interface {
	Send(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL