proto

package
v0.0.0-...-6c25587 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	EchoTestService_Echo_FullMethodName        = "/proto.EchoTestService/Echo"
	EchoTestService_ForwardEcho_FullMethodName = "/proto.EchoTestService/ForwardEcho"
)

Variables

View Source
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.

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Alpn.ProtoReflect.Descriptor instead.

func (*Alpn) GetValue

func (x *Alpn) GetValue() []string

func (*Alpn) ProtoMessage

func (*Alpn) ProtoMessage()

func (*Alpn) ProtoReflect

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

func (*Alpn) Reset

func (x *Alpn) Reset()

func (*Alpn) String

func (x *Alpn) String() string

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use HBONE.ProtoReflect.Descriptor instead.

func (*HBONE) GetAddress

func (x *HBONE) GetAddress() string

func (*HBONE) GetCaCert

func (x *HBONE) GetCaCert() string

func (*HBONE) GetCaCertFile

func (x *HBONE) GetCaCertFile() string

func (*HBONE) GetCert

func (x *HBONE) GetCert() string

func (*HBONE) GetCertFile

func (x *HBONE) GetCertFile() string

func (*HBONE) GetHeaders

func (x *HBONE) GetHeaders() []*Header

func (*HBONE) GetInsecureSkipVerify

func (x *HBONE) GetInsecureSkipVerify() bool

func (*HBONE) GetKey

func (x *HBONE) GetKey() string

func (*HBONE) GetKeyFile

func (x *HBONE) GetKeyFile() string

func (*HBONE) ProtoMessage

func (*HBONE) ProtoMessage()

func (*HBONE) ProtoReflect

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

func (*HBONE) Reset

func (x *HBONE) Reset()

func (*HBONE) String

func (x *HBONE) String() string
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) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetKey

func (x *Header) GetKey() string

func (*Header) GetValue

func (x *Header) GetValue() string

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

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

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type ProxyProtoVersion

type ProxyProtoVersion int32
const (
	ProxyProtoVersion_NONE ProxyProtoVersion = 0
	ProxyProtoVersion_V1   ProxyProtoVersion = 1
	ProxyProtoVersion_V2   ProxyProtoVersion = 2
)

func (ProxyProtoVersion) Descriptor

func (ProxyProtoVersion) Enum

func (ProxyProtoVersion) EnumDescriptor deprecated

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

Deprecated: Use ProxyProtoVersion.Descriptor instead.

func (ProxyProtoVersion) Number

func (ProxyProtoVersion) String

func (x ProxyProtoVersion) String() string

func (ProxyProtoVersion) Type

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) ForwardEcho

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.

Jump to

Keyboard shortcuts

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