Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterEchoTestServiceServer(s grpc.ServiceRegistrar, srv EchoTestServiceServer)
- type Alpn
- type EchoRequest
- type EchoResponse
- type EchoTestServiceClient
- type EchoTestServiceServer
- type ForwardEchoRequest
- func (*ForwardEchoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardEchoRequest) GetAlpn() *Alpn
- func (x *ForwardEchoRequest) GetCaCert() string
- func (x *ForwardEchoRequest) GetCaCertFile() string
- func (x *ForwardEchoRequest) GetCert() string
- func (x *ForwardEchoRequest) GetCertFile() string
- func (x *ForwardEchoRequest) GetCount() int32
- func (x *ForwardEchoRequest) GetExpectedResponse() *wrapperspb.StringValue
- func (x *ForwardEchoRequest) GetFollowRedirects() bool
- func (x *ForwardEchoRequest) GetForceDNSLookup() bool
- func (x *ForwardEchoRequest) GetForceIpFamily() string
- func (x *ForwardEchoRequest) GetHbone() *HBONE
- func (x *ForwardEchoRequest) GetHeaders() []*Header
- func (x *ForwardEchoRequest) GetHttp2() bool
- func (x *ForwardEchoRequest) GetHttp3() bool
- func (x *ForwardEchoRequest) GetInsecureSkipVerify() bool
- func (x *ForwardEchoRequest) GetKey() string
- func (x *ForwardEchoRequest) GetKeyFile() string
- func (x *ForwardEchoRequest) GetMessage() string
- func (x *ForwardEchoRequest) GetMethod() string
- func (x *ForwardEchoRequest) GetNewConnectionPerRequest() bool
- func (x *ForwardEchoRequest) GetProxyProtocolVersion() ProxyProtoVersion
- func (x *ForwardEchoRequest) GetQps() int32
- func (x *ForwardEchoRequest) GetServerFirst() bool
- func (x *ForwardEchoRequest) GetServerName() string
- func (x *ForwardEchoRequest) GetTimeoutMicros() int64
- func (x *ForwardEchoRequest) GetUrl() string
- func (*ForwardEchoRequest) ProtoMessage()
- func (x *ForwardEchoRequest) ProtoReflect() protoreflect.Message
- func (x *ForwardEchoRequest) Reset()
- func (x *ForwardEchoRequest) String() string
- type ForwardEchoResponse
- func (*ForwardEchoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ForwardEchoResponse) GetOutput() []string
- func (*ForwardEchoResponse) ProtoMessage()
- func (x *ForwardEchoResponse) ProtoReflect() protoreflect.Message
- func (x *ForwardEchoResponse) Reset()
- func (x *ForwardEchoResponse) String() string
- type HBONE
- func (*HBONE) Descriptor() ([]byte, []int)deprecated
- func (x *HBONE) GetAddress() string
- func (x *HBONE) GetCaCert() string
- func (x *HBONE) GetCaCertFile() string
- func (x *HBONE) GetCert() string
- func (x *HBONE) GetCertFile() string
- func (x *HBONE) GetHeaders() []*Header
- func (x *HBONE) GetInsecureSkipVerify() bool
- func (x *HBONE) GetKey() string
- func (x *HBONE) GetKeyFile() string
- func (*HBONE) ProtoMessage()
- func (x *HBONE) ProtoReflect() protoreflect.Message
- func (x *HBONE) Reset()
- func (x *HBONE) String() string
- type Header
- type ProxyProtoVersion
- func (ProxyProtoVersion) Descriptor() protoreflect.EnumDescriptor
- func (x ProxyProtoVersion) Enum() *ProxyProtoVersion
- func (ProxyProtoVersion) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProxyProtoVersion) Number() protoreflect.EnumNumber
- func (x ProxyProtoVersion) String() string
- func (ProxyProtoVersion) Type() protoreflect.EnumType
- type UnimplementedEchoTestServiceServer
- type UnsafeEchoTestServiceServer
Constants ¶
const ( EchoTestService_Echo_FullMethodName = "/proto.EchoTestService/Echo" EchoTestService_ForwardEcho_FullMethodName = "/proto.EchoTestService/ForwardEcho" )
Variables ¶
var ( ProxyProtoVersion_name = map[int32]string{ 0: "NONE", 1: "V1", 2: "V2", } ProxyProtoVersion_value = map[string]int32{ "NONE": 0, "V1": 1, "V2": 2, } )
Enum value maps for ProxyProtoVersion.
var EchoTestService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.EchoTestService", HandlerType: (*EchoTestServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _EchoTestService_Echo_Handler, }, { MethodName: "ForwardEcho", Handler: _EchoTestService_ForwardEcho_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "test/echo/proto/echo.proto", }
EchoTestService_ServiceDesc is the grpc.ServiceDesc for EchoTestService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_test_echo_proto_echo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoTestServiceServer ¶
func RegisterEchoTestServiceServer(s grpc.ServiceRegistrar, srv EchoTestServiceServer)
Types ¶
type Alpn ¶
type Alpn struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Alpn) Descriptor
deprecated
func (*Alpn) ProtoMessage ¶
func (*Alpn) ProtoMessage()
func (*Alpn) ProtoReflect ¶
func (x *Alpn) ProtoReflect() protoreflect.Message
type EchoRequest ¶
type EchoRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetMessage ¶
func (x *EchoRequest) GetMessage() string
func (*EchoRequest) ProtoMessage ¶
func (*EchoRequest) ProtoMessage()
func (*EchoRequest) ProtoReflect ¶
func (x *EchoRequest) ProtoReflect() protoreflect.Message
func (*EchoRequest) Reset ¶
func (x *EchoRequest) Reset()
func (*EchoRequest) String ¶
func (x *EchoRequest) String() string
type EchoResponse ¶
type EchoResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoResponse) Descriptor
deprecated
func (*EchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.
func (*EchoResponse) GetMessage ¶
func (x *EchoResponse) GetMessage() string
func (*EchoResponse) ProtoMessage ¶
func (*EchoResponse) ProtoMessage()
func (*EchoResponse) ProtoReflect ¶
func (x *EchoResponse) ProtoReflect() protoreflect.Message
func (*EchoResponse) Reset ¶
func (x *EchoResponse) Reset()
func (*EchoResponse) String ¶
func (x *EchoResponse) String() string
type EchoTestServiceClient ¶
type EchoTestServiceClient interface { Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) ForwardEcho(ctx context.Context, in *ForwardEchoRequest, opts ...grpc.CallOption) (*ForwardEchoResponse, error) }
EchoTestServiceClient is the client API for EchoTestService 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.
func NewEchoTestServiceClient ¶
func NewEchoTestServiceClient(cc grpc.ClientConnInterface) EchoTestServiceClient
type EchoTestServiceServer ¶
type EchoTestServiceServer interface { Echo(context.Context, *EchoRequest) (*EchoResponse, error) ForwardEcho(context.Context, *ForwardEchoRequest) (*ForwardEchoResponse, error) // contains filtered or unexported methods }
EchoTestServiceServer is the server API for EchoTestService service. All implementations must embed UnimplementedEchoTestServiceServer for forward compatibility.
type ForwardEchoRequest ¶
type ForwardEchoRequest struct { Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` Qps int32 `protobuf:"varint,2,opt,name=qps,proto3" json:"qps,omitempty"` TimeoutMicros int64 `protobuf:"varint,3,opt,name=timeout_micros,json=timeoutMicros,proto3" json:"timeout_micros,omitempty"` Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` Headers []*Header `protobuf:"bytes,5,rep,name=headers,proto3" json:"headers,omitempty"` Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` // Method for the request. Valid only for HTTP Method string `protobuf:"bytes,9,opt,name=method,proto3" json:"method,omitempty"` // If true, requests will be sent using h2c prior knowledge Http2 bool `protobuf:"varint,7,opt,name=http2,proto3" json:"http2,omitempty"` // If true, requests will be sent using http3 Http3 bool `protobuf:"varint,15,opt,name=http3,proto3" json:"http3,omitempty"` // If true, requests will not be sent until magic string is received ServerFirst bool `protobuf:"varint,8,opt,name=serverFirst,proto3" json:"serverFirst,omitempty"` // If true, 301 redirects will be followed FollowRedirects bool `protobuf:"varint,14,opt,name=followRedirects,proto3" json:"followRedirects,omitempty"` // If non-empty, make the request with the corresponding cert and key. Cert string `protobuf:"bytes,10,opt,name=cert,proto3" json:"cert,omitempty"` Key string `protobuf:"bytes,11,opt,name=key,proto3" json:"key,omitempty"` // If non-empty, verify the server CA CaCert string `protobuf:"bytes,12,opt,name=caCert,proto3" json:"caCert,omitempty"` // If non-empty, make the request with the corresponding cert and key file. CertFile string `protobuf:"bytes,16,opt,name=certFile,proto3" json:"certFile,omitempty"` KeyFile string `protobuf:"bytes,17,opt,name=keyFile,proto3" json:"keyFile,omitempty"` // If non-empty, verify the server CA with the ca cert file. CaCertFile string `protobuf:"bytes,18,opt,name=caCertFile,proto3" json:"caCertFile,omitempty"` // Skip verifying peer's certificate. InsecureSkipVerify bool `protobuf:"varint,19,opt,name=insecureSkipVerify,proto3" json:"insecureSkipVerify,omitempty"` // List of ALPNs to present. If not set, this will be automatically be set based on the protocol Alpn *Alpn `protobuf:"bytes,13,opt,name=alpn,proto3" json:"alpn,omitempty"` // Server name (SNI) to present in TLS connections. If not set, Host will be used for http requests. ServerName string `protobuf:"bytes,20,opt,name=serverName,proto3" json:"serverName,omitempty"` // Expected response determines what string to look for in the response to validate TCP requests succeeded. // If not set, defaults to "StatusCode=200" ExpectedResponse *wrapperspb.StringValue `protobuf:"bytes,21,opt,name=expectedResponse,proto3" json:"expectedResponse,omitempty"` // If set, a new connection will be made to the server for each individual request. If false, an attempt // will be made to re-use the connection for the life of the forward request. This is automatically // set for DNS, TCP, TLS, and WebSocket protocols. NewConnectionPerRequest bool `protobuf:"varint,22,opt,name=newConnectionPerRequest,proto3" json:"newConnectionPerRequest,omitempty"` // If set, each request will force a DNS lookup. Only applies if newConnectionPerRequest is set. ForceDNSLookup bool `protobuf:"varint,23,opt,name=forceDNSLookup,proto3" json:"forceDNSLookup,omitempty"` // force_ip_family will force a specific IP family to be used for DNS resolution only. // Valid values: "tcp4", "tcp6". ForceIpFamily string `protobuf:"bytes,26,opt,name=force_ip_family,json=forceIpFamily,proto3" json:"force_ip_family,omitempty"` // HBONE communication settings. If provided, requests will be tunnelled. Hbone *HBONE `protobuf:"bytes,24,opt,name=hbone,proto3" json:"hbone,omitempty"` ProxyProtocolVersion ProxyProtoVersion `protobuf:"varint,25,opt,name=proxyProtocolVersion,proto3,enum=proto.ProxyProtoVersion" json:"proxyProtocolVersion,omitempty"` // contains filtered or unexported fields }
func (*ForwardEchoRequest) Descriptor
deprecated
func (*ForwardEchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use ForwardEchoRequest.ProtoReflect.Descriptor instead.
func (*ForwardEchoRequest) GetAlpn ¶
func (x *ForwardEchoRequest) GetAlpn() *Alpn
func (*ForwardEchoRequest) GetCaCert ¶
func (x *ForwardEchoRequest) GetCaCert() string
func (*ForwardEchoRequest) GetCaCertFile ¶
func (x *ForwardEchoRequest) GetCaCertFile() string
func (*ForwardEchoRequest) GetCert ¶
func (x *ForwardEchoRequest) GetCert() string
func (*ForwardEchoRequest) GetCertFile ¶
func (x *ForwardEchoRequest) GetCertFile() string
func (*ForwardEchoRequest) GetCount ¶
func (x *ForwardEchoRequest) GetCount() int32
func (*ForwardEchoRequest) GetExpectedResponse ¶
func (x *ForwardEchoRequest) GetExpectedResponse() *wrapperspb.StringValue
func (*ForwardEchoRequest) GetFollowRedirects ¶
func (x *ForwardEchoRequest) GetFollowRedirects() bool
func (*ForwardEchoRequest) GetForceDNSLookup ¶
func (x *ForwardEchoRequest) GetForceDNSLookup() bool
func (*ForwardEchoRequest) GetForceIpFamily ¶
func (x *ForwardEchoRequest) GetForceIpFamily() string
func (*ForwardEchoRequest) GetHbone ¶
func (x *ForwardEchoRequest) GetHbone() *HBONE
func (*ForwardEchoRequest) GetHeaders ¶
func (x *ForwardEchoRequest) GetHeaders() []*Header
func (*ForwardEchoRequest) GetHttp2 ¶
func (x *ForwardEchoRequest) GetHttp2() bool
func (*ForwardEchoRequest) GetHttp3 ¶
func (x *ForwardEchoRequest) GetHttp3() bool
func (*ForwardEchoRequest) GetInsecureSkipVerify ¶
func (x *ForwardEchoRequest) GetInsecureSkipVerify() bool
func (*ForwardEchoRequest) GetKey ¶
func (x *ForwardEchoRequest) GetKey() string
func (*ForwardEchoRequest) GetKeyFile ¶
func (x *ForwardEchoRequest) GetKeyFile() string
func (*ForwardEchoRequest) GetMessage ¶
func (x *ForwardEchoRequest) GetMessage() string
func (*ForwardEchoRequest) GetMethod ¶
func (x *ForwardEchoRequest) GetMethod() string
func (*ForwardEchoRequest) GetNewConnectionPerRequest ¶
func (x *ForwardEchoRequest) GetNewConnectionPerRequest() bool
func (*ForwardEchoRequest) GetProxyProtocolVersion ¶
func (x *ForwardEchoRequest) GetProxyProtocolVersion() ProxyProtoVersion
func (*ForwardEchoRequest) GetQps ¶
func (x *ForwardEchoRequest) GetQps() int32
func (*ForwardEchoRequest) GetServerFirst ¶
func (x *ForwardEchoRequest) GetServerFirst() bool
func (*ForwardEchoRequest) GetServerName ¶
func (x *ForwardEchoRequest) GetServerName() string
func (*ForwardEchoRequest) GetTimeoutMicros ¶
func (x *ForwardEchoRequest) GetTimeoutMicros() int64
func (*ForwardEchoRequest) GetUrl ¶
func (x *ForwardEchoRequest) GetUrl() string
func (*ForwardEchoRequest) ProtoMessage ¶
func (*ForwardEchoRequest) ProtoMessage()
func (*ForwardEchoRequest) ProtoReflect ¶
func (x *ForwardEchoRequest) ProtoReflect() protoreflect.Message
func (*ForwardEchoRequest) Reset ¶
func (x *ForwardEchoRequest) Reset()
func (*ForwardEchoRequest) String ¶
func (x *ForwardEchoRequest) String() string
type ForwardEchoResponse ¶
type ForwardEchoResponse struct { Output []string `protobuf:"bytes,1,rep,name=output,proto3" json:"output,omitempty"` // contains filtered or unexported fields }
func (*ForwardEchoResponse) Descriptor
deprecated
func (*ForwardEchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use ForwardEchoResponse.ProtoReflect.Descriptor instead.
func (*ForwardEchoResponse) GetOutput ¶
func (x *ForwardEchoResponse) GetOutput() []string
func (*ForwardEchoResponse) ProtoMessage ¶
func (*ForwardEchoResponse) ProtoMessage()
func (*ForwardEchoResponse) ProtoReflect ¶
func (x *ForwardEchoResponse) ProtoReflect() protoreflect.Message
func (*ForwardEchoResponse) Reset ¶
func (x *ForwardEchoResponse) Reset()
func (*ForwardEchoResponse) String ¶
func (x *ForwardEchoResponse) String() string
type HBONE ¶
type HBONE struct { Address string `protobuf:"bytes,9,opt,name=address,proto3" json:"address,omitempty"` Headers []*Header `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` // If non-empty, make the request with the corresponding cert and key. Cert string `protobuf:"bytes,2,opt,name=cert,proto3" json:"cert,omitempty"` Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // If non-empty, verify the server CA CaCert string `protobuf:"bytes,4,opt,name=caCert,proto3" json:"caCert,omitempty"` // If non-empty, make the request with the corresponding cert and key file. CertFile string `protobuf:"bytes,5,opt,name=certFile,proto3" json:"certFile,omitempty"` KeyFile string `protobuf:"bytes,6,opt,name=keyFile,proto3" json:"keyFile,omitempty"` // If non-empty, verify the server CA with the ca cert file. CaCertFile string `protobuf:"bytes,7,opt,name=caCertFile,proto3" json:"caCertFile,omitempty"` // Skip verifying peer's certificate. InsecureSkipVerify bool `protobuf:"varint,8,opt,name=insecureSkipVerify,proto3" json:"insecureSkipVerify,omitempty"` // contains filtered or unexported fields }
func (*HBONE) Descriptor
deprecated
func (*HBONE) GetAddress ¶
func (*HBONE) GetCaCertFile ¶
func (*HBONE) GetCertFile ¶
func (*HBONE) GetHeaders ¶
func (*HBONE) GetInsecureSkipVerify ¶
func (*HBONE) GetKeyFile ¶
func (*HBONE) ProtoMessage ¶
func (*HBONE) ProtoMessage()
func (*HBONE) ProtoReflect ¶
func (x *HBONE) ProtoReflect() protoreflect.Message
type Header ¶
type Header struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Header) Descriptor
deprecated
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type ProxyProtoVersion ¶
type ProxyProtoVersion int32
const ( ProxyProtoVersion_NONE ProxyProtoVersion = 0 ProxyProtoVersion_V1 ProxyProtoVersion = 1 ProxyProtoVersion_V2 ProxyProtoVersion = 2 )
func (ProxyProtoVersion) Descriptor ¶
func (ProxyProtoVersion) Descriptor() protoreflect.EnumDescriptor
func (ProxyProtoVersion) Enum ¶
func (x ProxyProtoVersion) Enum() *ProxyProtoVersion
func (ProxyProtoVersion) EnumDescriptor
deprecated
func (ProxyProtoVersion) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProxyProtoVersion.Descriptor instead.
func (ProxyProtoVersion) Number ¶
func (x ProxyProtoVersion) Number() protoreflect.EnumNumber
func (ProxyProtoVersion) String ¶
func (x ProxyProtoVersion) String() string
func (ProxyProtoVersion) Type ¶
func (ProxyProtoVersion) Type() protoreflect.EnumType
type UnimplementedEchoTestServiceServer ¶
type UnimplementedEchoTestServiceServer struct{}
UnimplementedEchoTestServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedEchoTestServiceServer) Echo ¶
func (UnimplementedEchoTestServiceServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error)
func (UnimplementedEchoTestServiceServer) ForwardEcho ¶
func (UnimplementedEchoTestServiceServer) ForwardEcho(context.Context, *ForwardEchoRequest) (*ForwardEchoResponse, error)
type UnsafeEchoTestServiceServer ¶
type UnsafeEchoTestServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEchoTestServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoTestServiceServer will result in compilation errors.