...

Package grpc_testing

import "google.golang.org/grpc/interop/stress/grpc_testing"
Overview
Index

Overview ▾

Index ▾

Constants
Variables
func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer)
type EmptyMessage
    func (*EmptyMessage) Descriptor() ([]byte, []int)
    func (*EmptyMessage) ProtoMessage()
    func (x *EmptyMessage) ProtoReflect() protoreflect.Message
    func (x *EmptyMessage) Reset()
    func (x *EmptyMessage) String() string
type GaugeRequest
    func (*GaugeRequest) Descriptor() ([]byte, []int)
    func (x *GaugeRequest) GetName() string
    func (*GaugeRequest) ProtoMessage()
    func (x *GaugeRequest) ProtoReflect() protoreflect.Message
    func (x *GaugeRequest) Reset()
    func (x *GaugeRequest) String() string
type GaugeResponse
    func (*GaugeResponse) Descriptor() ([]byte, []int)
    func (x *GaugeResponse) GetDoubleValue() float64
    func (x *GaugeResponse) GetLongValue() int64
    func (x *GaugeResponse) GetName() string
    func (x *GaugeResponse) GetStringValue() string
    func (m *GaugeResponse) GetValue() isGaugeResponse_Value
    func (*GaugeResponse) ProtoMessage()
    func (x *GaugeResponse) ProtoReflect() protoreflect.Message
    func (x *GaugeResponse) Reset()
    func (x *GaugeResponse) String() string
type GaugeResponse_DoubleValue
type GaugeResponse_LongValue
type GaugeResponse_StringValue
type MetricsServiceClient
    func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient
type MetricsServiceServer
type MetricsService_GetAllGaugesClient
type MetricsService_GetAllGaugesServer
type UnimplementedMetricsServiceServer
    func (UnimplementedMetricsServiceServer) GetAllGauges(*EmptyMessage, grpc.ServerStreamingServer[GaugeResponse]) error
    func (UnimplementedMetricsServiceServer) GetGauge(context.Context, *GaugeRequest) (*GaugeResponse, error)
type UnsafeMetricsServiceServer

Package files

metrics.pb.go metrics_grpc.pb.go

Constants

const (
    MetricsService_GetAllGauges_FullMethodName = "/grpc.testing.MetricsService/GetAllGauges"
    MetricsService_GetGauge_FullMethodName     = "/grpc.testing.MetricsService/GetGauge"
)

Variables

var File_interop_stress_grpc_testing_metrics_proto protoreflect.FileDescriptor

MetricsService_ServiceDesc is the grpc.ServiceDesc for MetricsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

var MetricsService_ServiceDesc = grpc.ServiceDesc{
    ServiceName: "grpc.testing.MetricsService",
    HandlerType: (*MetricsServiceServer)(nil),
    Methods: []grpc.MethodDesc{
        {
            MethodName: "GetGauge",
            Handler:    _MetricsService_GetGauge_Handler,
        },
    },
    Streams: []grpc.StreamDesc{
        {
            StreamName:    "GetAllGauges",
            Handler:       _MetricsService_GetAllGauges_Handler,
            ServerStreams: true,
        },
    },
    Metadata: "interop/stress/grpc_testing/metrics.proto",
}

func RegisterMetricsServiceServer

func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer)

type EmptyMessage

type EmptyMessage struct {
    // contains filtered or unexported fields
}

func (*EmptyMessage) Descriptor

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

Deprecated: Use EmptyMessage.ProtoReflect.Descriptor instead.

func (*EmptyMessage) ProtoMessage

func (*EmptyMessage) ProtoMessage()

func (*EmptyMessage) ProtoReflect

func (x *EmptyMessage) ProtoReflect() protoreflect.Message

func (*EmptyMessage) Reset

func (x *EmptyMessage) Reset()

func (*EmptyMessage) String

func (x *EmptyMessage) String() string

type GaugeRequest

Request message containing the gauge name

type GaugeRequest struct {
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // contains filtered or unexported fields
}

func (*GaugeRequest) Descriptor

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

Deprecated: Use GaugeRequest.ProtoReflect.Descriptor instead.

func (*GaugeRequest) GetName

func (x *GaugeRequest) GetName() string

func (*GaugeRequest) ProtoMessage

func (*GaugeRequest) ProtoMessage()

func (*GaugeRequest) ProtoReflect

func (x *GaugeRequest) ProtoReflect() protoreflect.Message

func (*GaugeRequest) Reset

func (x *GaugeRequest) Reset()

func (*GaugeRequest) String

func (x *GaugeRequest) String() string

type GaugeResponse

Response message containing the gauge name and value

type GaugeResponse struct {
    Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // Types that are assignable to Value:
    //
    //	*GaugeResponse_LongValue
    //	*GaugeResponse_DoubleValue
    //	*GaugeResponse_StringValue
    Value isGaugeResponse_Value `protobuf_oneof:"value"`
    // contains filtered or unexported fields
}

func (*GaugeResponse) Descriptor

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

Deprecated: Use GaugeResponse.ProtoReflect.Descriptor instead.

func (*GaugeResponse) GetDoubleValue

func (x *GaugeResponse) GetDoubleValue() float64

func (*GaugeResponse) GetLongValue

func (x *GaugeResponse) GetLongValue() int64

func (*GaugeResponse) GetName

func (x *GaugeResponse) GetName() string

func (*GaugeResponse) GetStringValue

func (x *GaugeResponse) GetStringValue() string

func (*GaugeResponse) GetValue

func (m *GaugeResponse) GetValue() isGaugeResponse_Value

func (*GaugeResponse) ProtoMessage

func (*GaugeResponse) ProtoMessage()

func (*GaugeResponse) ProtoReflect

func (x *GaugeResponse) ProtoReflect() protoreflect.Message

func (*GaugeResponse) Reset

func (x *GaugeResponse) Reset()

func (*GaugeResponse) String

func (x *GaugeResponse) String() string

type GaugeResponse_DoubleValue

type GaugeResponse_DoubleValue struct {
    DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type GaugeResponse_LongValue

type GaugeResponse_LongValue struct {
    LongValue int64 `protobuf:"varint,2,opt,name=long_value,json=longValue,proto3,oneof"`
}

type GaugeResponse_StringValue

type GaugeResponse_StringValue struct {
    StringValue string `protobuf:"bytes,4,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type MetricsServiceClient

MetricsServiceClient is the client API for MetricsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type MetricsServiceClient interface {
    // Returns the values of all the gauges that are currently being maintained by
    // the service
    GetAllGauges(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GaugeResponse], error)
    // Returns the value of one gauge
    GetGauge(ctx context.Context, in *GaugeRequest, opts ...grpc.CallOption) (*GaugeResponse, error)
}

func NewMetricsServiceClient

func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient

type MetricsServiceServer

MetricsServiceServer is the server API for MetricsService service. All implementations must embed UnimplementedMetricsServiceServer for forward compatibility

type MetricsServiceServer interface {
    // Returns the values of all the gauges that are currently being maintained by
    // the service
    GetAllGauges(*EmptyMessage, grpc.ServerStreamingServer[GaugeResponse]) error
    // Returns the value of one gauge
    GetGauge(context.Context, *GaugeRequest) (*GaugeResponse, error)
    // contains filtered or unexported methods
}

type MetricsService_GetAllGaugesClient

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type MetricsService_GetAllGaugesClient = grpc.ServerStreamingClient[GaugeResponse]

type MetricsService_GetAllGaugesServer

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type MetricsService_GetAllGaugesServer = grpc.ServerStreamingServer[GaugeResponse]

type UnimplementedMetricsServiceServer

UnimplementedMetricsServiceServer must be embedded to have forward compatible implementations.

type UnimplementedMetricsServiceServer struct {
}

func (UnimplementedMetricsServiceServer) GetAllGauges

func (UnimplementedMetricsServiceServer) GetAllGauges(*EmptyMessage, grpc.ServerStreamingServer[GaugeResponse]) error

func (UnimplementedMetricsServiceServer) GetGauge

func (UnimplementedMetricsServiceServer) GetGauge(context.Context, *GaugeRequest) (*GaugeResponse, error)

type UnsafeMetricsServiceServer

UnsafeMetricsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetricsServiceServer will result in compilation errors.

type UnsafeMetricsServiceServer interface {
    // contains filtered or unexported methods
}