grpc_testing

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2015 License: BSD-3-Clause, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package grpc_testing is a generated protocol buffer package.

It is generated from these files:

test.proto

It has these top-level messages:

StatsRequest
ServerStats
Payload
HistogramData
ClientConfig
Mark
ClientArgs
ClientStats
ClientStatus
ServerConfig
ServerArgs
ServerStatus
SimpleRequest
SimpleResponse

Index

Constants

This section is empty.

Variables

View Source
var ClientType_name = map[int32]string{
	0: "SYNCHRONOUS_CLIENT",
	1: "ASYNC_CLIENT",
}
View Source
var ClientType_value = map[string]int32{
	"SYNCHRONOUS_CLIENT": 0,
	"ASYNC_CLIENT":       1,
}
View Source
var PayloadType_name = map[int32]string{
	0: "COMPRESSABLE",
	1: "UNCOMPRESSABLE",
	2: "RANDOM",
}
View Source
var PayloadType_value = map[string]int32{
	"COMPRESSABLE":   0,
	"UNCOMPRESSABLE": 1,
	"RANDOM":         2,
}
View Source
var RpcType_name = map[int32]string{
	0: "UNARY",
	1: "STREAMING",
}
View Source
var RpcType_value = map[string]int32{
	"UNARY":     0,
	"STREAMING": 1,
}
View Source
var ServerType_name = map[int32]string{
	0: "SYNCHRONOUS_SERVER",
	1: "ASYNC_SERVER",
}
View Source
var ServerType_value = map[string]int32{
	"SYNCHRONOUS_SERVER": 0,
	"ASYNC_SERVER":       1,
}

Functions

func RegisterTestServiceServer

func RegisterTestServiceServer(s *grpc.Server, srv TestServiceServer)

func RegisterWorkerServer

func RegisterWorkerServer(s *grpc.Server, srv WorkerServer)

Types

type ClientArgs

type ClientArgs struct {
	Setup *ClientConfig `protobuf:"bytes,1,opt,name=setup" json:"setup,omitempty"`
	Mark  *Mark         `protobuf:"bytes,2,opt,name=mark" json:"mark,omitempty"`
}

func (*ClientArgs) GetMark

func (m *ClientArgs) GetMark() *Mark

func (*ClientArgs) GetSetup

func (m *ClientArgs) GetSetup() *ClientConfig

func (*ClientArgs) ProtoMessage

func (*ClientArgs) ProtoMessage()

func (*ClientArgs) Reset

func (m *ClientArgs) Reset()

func (*ClientArgs) String

func (m *ClientArgs) String() string

type ClientConfig

type ClientConfig struct {
	ServerTargets             []string   `protobuf:"bytes,1,rep,name=server_targets" json:"server_targets,omitempty"`
	ClientType                ClientType `protobuf:"varint,2,opt,name=client_type,enum=grpc.testing.ClientType" json:"client_type,omitempty"`
	EnableSsl                 bool       `protobuf:"varint,3,opt,name=enable_ssl" json:"enable_ssl,omitempty"`
	OutstandingRpcsPerChannel int32      `protobuf:"varint,4,opt,name=outstanding_rpcs_per_channel" json:"outstanding_rpcs_per_channel,omitempty"`
	ClientChannels            int32      `protobuf:"varint,5,opt,name=client_channels" json:"client_channels,omitempty"`
	PayloadSize               int32      `protobuf:"varint,6,opt,name=payload_size" json:"payload_size,omitempty"`
	// only for async client:
	AsyncClientThreads int32   `protobuf:"varint,7,opt,name=async_client_threads" json:"async_client_threads,omitempty"`
	RpcType            RpcType `protobuf:"varint,8,opt,name=rpc_type,enum=grpc.testing.RpcType" json:"rpc_type,omitempty"`
}

func (*ClientConfig) ProtoMessage

func (*ClientConfig) ProtoMessage()

func (*ClientConfig) Reset

func (m *ClientConfig) Reset()

func (*ClientConfig) String

func (m *ClientConfig) String() string

type ClientStats

type ClientStats struct {
	Latencies   *HistogramData `protobuf:"bytes,1,opt,name=latencies" json:"latencies,omitempty"`
	TimeElapsed float64        `protobuf:"fixed64,3,opt,name=time_elapsed" json:"time_elapsed,omitempty"`
	TimeUser    float64        `protobuf:"fixed64,4,opt,name=time_user" json:"time_user,omitempty"`
	TimeSystem  float64        `protobuf:"fixed64,5,opt,name=time_system" json:"time_system,omitempty"`
}

func (*ClientStats) GetLatencies

func (m *ClientStats) GetLatencies() *HistogramData

func (*ClientStats) ProtoMessage

func (*ClientStats) ProtoMessage()

func (*ClientStats) Reset

func (m *ClientStats) Reset()

func (*ClientStats) String

func (m *ClientStats) String() string

type ClientStatus

type ClientStatus struct {
	Stats *ClientStats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"`
}

func (*ClientStatus) GetStats

func (m *ClientStatus) GetStats() *ClientStats

func (*ClientStatus) ProtoMessage

func (*ClientStatus) ProtoMessage()

func (*ClientStatus) Reset

func (m *ClientStatus) Reset()

func (*ClientStatus) String

func (m *ClientStatus) String() string

type ClientType

type ClientType int32
const (
	ClientType_SYNCHRONOUS_CLIENT ClientType = 0
	ClientType_ASYNC_CLIENT       ClientType = 1
)

func (ClientType) String

func (x ClientType) String() string

type HistogramData

type HistogramData struct {
	Bucket       []uint32 `protobuf:"varint,1,rep,name=bucket" json:"bucket,omitempty"`
	MinSeen      float64  `protobuf:"fixed64,2,opt,name=min_seen" json:"min_seen,omitempty"`
	MaxSeen      float64  `protobuf:"fixed64,3,opt,name=max_seen" json:"max_seen,omitempty"`
	Sum          float64  `protobuf:"fixed64,4,opt,name=sum" json:"sum,omitempty"`
	SumOfSquares float64  `protobuf:"fixed64,5,opt,name=sum_of_squares" json:"sum_of_squares,omitempty"`
	Count        float64  `protobuf:"fixed64,6,opt,name=count" json:"count,omitempty"`
}

func (*HistogramData) ProtoMessage

func (*HistogramData) ProtoMessage()

func (*HistogramData) Reset

func (m *HistogramData) Reset()

func (*HistogramData) String

func (m *HistogramData) String() string

type Mark

type Mark struct {
}

Request current stats

func (*Mark) ProtoMessage

func (*Mark) ProtoMessage()

func (*Mark) Reset

func (m *Mark) Reset()

func (*Mark) String

func (m *Mark) String() string

type Payload

type Payload struct {
	// The type of data in body.
	Type PayloadType `protobuf:"varint,1,opt,name=type,enum=grpc.testing.PayloadType" json:"type,omitempty"`
	// Primary contents of payload.
	Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
}

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) Reset

func (m *Payload) Reset()

func (*Payload) String

func (m *Payload) String() string

type PayloadType

type PayloadType int32
const (
	// Compressable text format.
	PayloadType_COMPRESSABLE PayloadType = 0
	// Uncompressable binary format.
	PayloadType_UNCOMPRESSABLE PayloadType = 1
	// Randomly chosen from all other formats defined in this enum.
	PayloadType_RANDOM PayloadType = 2
)

func (PayloadType) String

func (x PayloadType) String() string

type RpcType

type RpcType int32
const (
	RpcType_UNARY     RpcType = 0
	RpcType_STREAMING RpcType = 1
)

func (RpcType) String

func (x RpcType) String() string

type ServerArgs

type ServerArgs struct {
	Setup *ServerConfig `protobuf:"bytes,1,opt,name=setup" json:"setup,omitempty"`
	Mark  *Mark         `protobuf:"bytes,2,opt,name=mark" json:"mark,omitempty"`
}

func (*ServerArgs) GetMark

func (m *ServerArgs) GetMark() *Mark

func (*ServerArgs) GetSetup

func (m *ServerArgs) GetSetup() *ServerConfig

func (*ServerArgs) ProtoMessage

func (*ServerArgs) ProtoMessage()

func (*ServerArgs) Reset

func (m *ServerArgs) Reset()

func (*ServerArgs) String

func (m *ServerArgs) String() string

type ServerConfig

type ServerConfig struct {
	ServerType ServerType `protobuf:"varint,1,opt,name=server_type,enum=grpc.testing.ServerType" json:"server_type,omitempty"`
	Threads    int32      `protobuf:"varint,2,opt,name=threads" json:"threads,omitempty"`
	EnableSsl  bool       `protobuf:"varint,3,opt,name=enable_ssl" json:"enable_ssl,omitempty"`
}

func (*ServerConfig) ProtoMessage

func (*ServerConfig) ProtoMessage()

func (*ServerConfig) Reset

func (m *ServerConfig) Reset()

func (*ServerConfig) String

func (m *ServerConfig) String() string

type ServerStats

type ServerStats struct {
	// wall clock time
	TimeElapsed float64 `protobuf:"fixed64,1,opt,name=time_elapsed" json:"time_elapsed,omitempty"`
	// user time used by the server process and threads
	TimeUser float64 `protobuf:"fixed64,2,opt,name=time_user" json:"time_user,omitempty"`
	// server time used by the server process and all threads
	TimeSystem float64 `protobuf:"fixed64,3,opt,name=time_system" json:"time_system,omitempty"`
}

func (*ServerStats) ProtoMessage

func (*ServerStats) ProtoMessage()

func (*ServerStats) Reset

func (m *ServerStats) Reset()

func (*ServerStats) String

func (m *ServerStats) String() string

type ServerStatus

type ServerStatus struct {
	Stats *ServerStats `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"`
	Port  int32        `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
}

func (*ServerStatus) GetStats

func (m *ServerStatus) GetStats() *ServerStats

func (*ServerStatus) ProtoMessage

func (*ServerStatus) ProtoMessage()

func (*ServerStatus) Reset

func (m *ServerStatus) Reset()

func (*ServerStatus) String

func (m *ServerStatus) String() string

type ServerType

type ServerType int32
const (
	ServerType_SYNCHRONOUS_SERVER ServerType = 0
	ServerType_ASYNC_SERVER       ServerType = 1
)

func (ServerType) String

func (x ServerType) String() string

type SimpleRequest

type SimpleRequest struct {
	// Desired payload type in the response from the server.
	// If response_type is RANDOM, server randomly chooses one from other formats.
	ResponseType PayloadType `protobuf:"varint,1,opt,name=response_type,enum=grpc.testing.PayloadType" json:"response_type,omitempty"`
	// Desired payload size in the response from the server.
	// If response_type is COMPRESSABLE, this denotes the size before compression.
	ResponseSize int32 `protobuf:"varint,2,opt,name=response_size" json:"response_size,omitempty"`
	// Optional input payload sent along with the request.
	Payload *Payload `protobuf:"bytes,3,opt,name=payload" json:"payload,omitempty"`
}

func (*SimpleRequest) GetPayload

func (m *SimpleRequest) GetPayload() *Payload

func (*SimpleRequest) ProtoMessage

func (*SimpleRequest) ProtoMessage()

func (*SimpleRequest) Reset

func (m *SimpleRequest) Reset()

func (*SimpleRequest) String

func (m *SimpleRequest) String() string

type SimpleResponse

type SimpleResponse struct {
	Payload *Payload `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"`
}

func (*SimpleResponse) GetPayload

func (m *SimpleResponse) GetPayload() *Payload

func (*SimpleResponse) ProtoMessage

func (*SimpleResponse) ProtoMessage()

func (*SimpleResponse) Reset

func (m *SimpleResponse) Reset()

func (*SimpleResponse) String

func (m *SimpleResponse) String() string

type StatsRequest

type StatsRequest struct {
	// run number
	TestNum int32 `protobuf:"varint,1,opt,name=test_num" json:"test_num,omitempty"`
}

func (*StatsRequest) ProtoMessage

func (*StatsRequest) ProtoMessage()

func (*StatsRequest) Reset

func (m *StatsRequest) Reset()

func (*StatsRequest) String

func (m *StatsRequest) String() string

type TestServiceClient

type TestServiceClient interface {
	// One request followed by one response.
	// The server returns the client payload as-is.
	UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error)
	// One request followed by one response.
	// The server returns the client payload as-is.
	StreamingCall(ctx context.Context, opts ...grpc.CallOption) (TestService_StreamingCallClient, error)
}

func NewTestServiceClient

func NewTestServiceClient(cc *grpc.ClientConn) TestServiceClient

type TestServiceServer

type TestServiceServer interface {
	// One request followed by one response.
	// The server returns the client payload as-is.
	UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error)
	// One request followed by one response.
	// The server returns the client payload as-is.
	StreamingCall(TestService_StreamingCallServer) error
}

type TestService_StreamingCallClient

type TestService_StreamingCallClient interface {
	Send(*SimpleRequest) error
	Recv() (*SimpleResponse, error)
	grpc.ClientStream
}

type TestService_StreamingCallServer

type TestService_StreamingCallServer interface {
	Send(*SimpleResponse) error
	Recv() (*SimpleRequest, error)
	grpc.ServerStream
}

type WorkerClient

type WorkerClient interface {
	// Start test with specified workload
	RunTest(ctx context.Context, opts ...grpc.CallOption) (Worker_RunTestClient, error)
	// Start test with specified workload
	RunServer(ctx context.Context, opts ...grpc.CallOption) (Worker_RunServerClient, error)
}

func NewWorkerClient

func NewWorkerClient(cc *grpc.ClientConn) WorkerClient

type WorkerServer

type WorkerServer interface {
	// Start test with specified workload
	RunTest(Worker_RunTestServer) error
	// Start test with specified workload
	RunServer(Worker_RunServerServer) error
}

type Worker_RunServerClient

type Worker_RunServerClient interface {
	Send(*ServerArgs) error
	Recv() (*ServerStatus, error)
	grpc.ClientStream
}

type Worker_RunServerServer

type Worker_RunServerServer interface {
	Send(*ServerStatus) error
	Recv() (*ServerArgs, error)
	grpc.ServerStream
}

type Worker_RunTestClient

type Worker_RunTestClient interface {
	Send(*ClientArgs) error
	Recv() (*ClientStatus, error)
	grpc.ClientStream
}

type Worker_RunTestServer

type Worker_RunTestServer interface {
	Send(*ClientStatus) error
	Recv() (*ClientArgs, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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