Allow passing custom error details, similar to gRPC. (#101)

This commit is contained in:
Denys Smirnov
2025-01-29 18:19:55 +02:00
committed by GitHub
parent 4a7c5603ff
commit 2a293dac9e
25 changed files with 490 additions and 616 deletions
+34 -8
View File
@@ -21,8 +21,11 @@ import (
"net/http"
"github.com/twitchtv/twirp"
spb "google.golang.org/genproto/googleapis/rpc/status"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)
var (
@@ -39,6 +42,8 @@ var (
type Error interface {
error
Code() ErrorCode
Details() []any
DetailsProto() []*anypb.Any
// convenience methods
ToHttp() int
@@ -51,10 +56,17 @@ func (e ErrorCode) Error() string {
return string(e)
}
func NewError(code ErrorCode, err error) Error {
func NewError(code ErrorCode, err error, details ...proto.Message) Error {
var protoDetails []*anypb.Any
for _, e := range details {
if p, err := anypb.New(e); err == nil {
protoDetails = append(protoDetails, p)
}
}
return &psrpcError{
error: err,
code: code,
error: err,
code: code,
details: protoDetails,
}
}
@@ -65,14 +77,15 @@ func NewErrorf(code ErrorCode, msg string, args ...interface{}) Error {
}
}
func NewErrorFromResponse(code, err string) Error {
func NewErrorFromResponse(code, err string, details ...*anypb.Any) Error {
if code == "" {
code = string(Unknown)
}
return &psrpcError{
error: errors.New(err),
code: ErrorCode(code),
error: errors.New(err),
code: ErrorCode(code),
details: details,
}
}
@@ -122,7 +135,8 @@ const (
type psrpcError struct {
error
code ErrorCode
code ErrorCode
details []*anypb.Any
}
func (e psrpcError) Code() ErrorCode {
@@ -162,6 +176,14 @@ func (e psrpcError) ToHttp() int {
}
}
func (e psrpcError) DetailsProto() []*anypb.Any {
return e.details
}
func (e psrpcError) Details() []any {
return e.GRPCStatus().Details()
}
func (e psrpcError) GRPCStatus() *status.Status {
var c codes.Code
switch e.code {
@@ -203,7 +225,11 @@ func (e psrpcError) GRPCStatus() *status.Status {
c = codes.Unknown
}
return status.New(c, e.Error())
return status.FromProto(&spb.Status{
Code: int32(c),
Message: e.Error(),
Details: e.details,
})
}
func (e psrpcError) toTwirp() twirp.Error {
+212 -357
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: internal.proto
@@ -26,6 +26,7 @@ import (
anypb "google.golang.org/protobuf/types/known/anypb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -36,22 +37,19 @@ const (
)
type Msg struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
unknownFields protoimpl.UnknownFields
TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *Msg) Reset() {
*x = Msg{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Msg) String() string {
@@ -62,7 +60,7 @@ func (*Msg) ProtoMessage() {}
func (x *Msg) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -99,20 +97,17 @@ func (x *Msg) GetChannel() string {
}
type Channel struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
unknownFields protoimpl.UnknownFields
Channel string `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *Channel) Reset() {
*x = Channel{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Channel) String() string {
@@ -123,7 +118,7 @@ func (*Channel) ProtoMessage() {}
func (x *Channel) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -146,27 +141,24 @@ func (x *Channel) GetChannel() string {
}
type Request struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
SentAt int64 `protobuf:"varint,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
Multi bool `protobuf:"varint,5,opt,name=multi,proto3" json:"multi,omitempty"`
Request *anypb.Any `protobuf:"bytes,6,opt,name=request,proto3" json:"request,omitempty"`
Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
RawRequest []byte `protobuf:"bytes,8,opt,name=raw_request,json=rawRequest,proto3" json:"raw_request,omitempty"`
unknownFields protoimpl.UnknownFields
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
SentAt int64 `protobuf:"varint,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
Multi bool `protobuf:"varint,5,opt,name=multi,proto3" json:"multi,omitempty"`
Request *anypb.Any `protobuf:"bytes,6,opt,name=request,proto3" json:"request,omitempty"`
Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
RawRequest []byte `protobuf:"bytes,8,opt,name=raw_request,json=rawRequest,proto3" json:"raw_request,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *Request) Reset() {
*x = Request{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Request) String() string {
@@ -177,7 +169,7 @@ func (*Request) ProtoMessage() {}
func (x *Request) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -249,26 +241,24 @@ func (x *Request) GetRawRequest() []byte {
}
type Response struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
SentAt int64 `protobuf:"varint,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Response *anypb.Any `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
Code string `protobuf:"bytes,6,opt,name=code,proto3" json:"code,omitempty"`
RawResponse []byte `protobuf:"bytes,7,opt,name=raw_response,json=rawResponse,proto3" json:"raw_response,omitempty"`
ErrorDetails []*anypb.Any `protobuf:"bytes,8,rep,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"`
unknownFields protoimpl.UnknownFields
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
SentAt int64 `protobuf:"varint,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Response *anypb.Any `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
Code string `protobuf:"bytes,6,opt,name=code,proto3" json:"code,omitempty"`
RawResponse []byte `protobuf:"bytes,7,opt,name=raw_response,json=rawResponse,proto3" json:"raw_response,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *Response) Reset() {
*x = Response{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Response) String() string {
@@ -279,7 +269,7 @@ func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -343,23 +333,27 @@ func (x *Response) GetRawResponse() []byte {
return nil
}
type ClaimRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
func (x *Response) GetErrorDetails() []*anypb.Any {
if x != nil {
return x.ErrorDetails
}
return nil
}
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
Affinity float32 `protobuf:"fixed32,3,opt,name=affinity,proto3" json:"affinity,omitempty"`
type ClaimRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
Affinity float32 `protobuf:"fixed32,3,opt,name=affinity,proto3" json:"affinity,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ClaimRequest) Reset() {
*x = ClaimRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ClaimRequest) String() string {
@@ -370,7 +364,7 @@ func (*ClaimRequest) ProtoMessage() {}
func (x *ClaimRequest) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -407,21 +401,18 @@ func (x *ClaimRequest) GetAffinity() float32 {
}
type ClaimResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
unknownFields protoimpl.UnknownFields
RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
ServerId string `protobuf:"bytes,2,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *ClaimResponse) Reset() {
*x = ClaimResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ClaimResponse) String() string {
@@ -432,7 +423,7 @@ func (*ClaimResponse) ProtoMessage() {}
func (x *ClaimResponse) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -462,30 +453,27 @@ func (x *ClaimResponse) GetServerId() string {
}
type Stream struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
StreamId string `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
SentAt int64 `protobuf:"varint,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
// Types that are assignable to Body:
state protoimpl.MessageState `protogen:"open.v1"`
StreamId string `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
SentAt int64 `protobuf:"varint,3,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Expiry int64 `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
// Types that are valid to be assigned to Body:
//
// *Stream_Open
// *Stream_Message
// *Stream_Ack
// *Stream_Close
Body isStream_Body `protobuf_oneof:"body"`
Body isStream_Body `protobuf_oneof:"body"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Stream) Reset() {
*x = Stream{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Stream) String() string {
@@ -496,7 +484,7 @@ func (*Stream) ProtoMessage() {}
func (x *Stream) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -539,37 +527,45 @@ func (x *Stream) GetExpiry() int64 {
return 0
}
func (m *Stream) GetBody() isStream_Body {
if m != nil {
return m.Body
func (x *Stream) GetBody() isStream_Body {
if x != nil {
return x.Body
}
return nil
}
func (x *Stream) GetOpen() *StreamOpen {
if x, ok := x.GetBody().(*Stream_Open); ok {
return x.Open
if x != nil {
if x, ok := x.Body.(*Stream_Open); ok {
return x.Open
}
}
return nil
}
func (x *Stream) GetMessage() *StreamMessage {
if x, ok := x.GetBody().(*Stream_Message); ok {
return x.Message
if x != nil {
if x, ok := x.Body.(*Stream_Message); ok {
return x.Message
}
}
return nil
}
func (x *Stream) GetAck() *StreamAck {
if x, ok := x.GetBody().(*Stream_Ack); ok {
return x.Ack
if x != nil {
if x, ok := x.Body.(*Stream_Ack); ok {
return x.Ack
}
}
return nil
}
func (x *Stream) GetClose() *StreamClose {
if x, ok := x.GetBody().(*Stream_Close); ok {
return x.Close
if x != nil {
if x, ok := x.Body.(*Stream_Close); ok {
return x.Close
}
}
return nil
}
@@ -603,21 +599,18 @@ func (*Stream_Ack) isStream_Body() {}
func (*Stream_Close) isStream_Body() {}
type StreamOpen struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
unknownFields protoimpl.UnknownFields
NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
sizeCache protoimpl.SizeCache
}
func (x *StreamOpen) Reset() {
*x = StreamOpen{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StreamOpen) String() string {
@@ -628,7 +621,7 @@ func (*StreamOpen) ProtoMessage() {}
func (x *StreamOpen) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -658,21 +651,18 @@ func (x *StreamOpen) GetMetadata() map[string]string {
}
type StreamMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Message *anypb.Any `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
RawMessage []byte `protobuf:"bytes,2,opt,name=raw_message,json=rawMessage,proto3" json:"raw_message,omitempty"`
unknownFields protoimpl.UnknownFields
Message *anypb.Any `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
RawMessage []byte `protobuf:"bytes,2,opt,name=raw_message,json=rawMessage,proto3" json:"raw_message,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *StreamMessage) Reset() {
*x = StreamMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StreamMessage) String() string {
@@ -683,7 +673,7 @@ func (*StreamMessage) ProtoMessage() {}
func (x *StreamMessage) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -713,18 +703,16 @@ func (x *StreamMessage) GetRawMessage() []byte {
}
type StreamAck struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StreamAck) Reset() {
*x = StreamAck{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StreamAck) String() string {
@@ -735,7 +723,7 @@ func (*StreamAck) ProtoMessage() {}
func (x *StreamAck) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -751,21 +739,18 @@ func (*StreamAck) Descriptor() ([]byte, []int) {
}
type StreamClose struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
unknownFields protoimpl.UnknownFields
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *StreamClose) Reset() {
*x = StreamClose{}
if protoimpl.UnsafeEnabled {
mi := &file_internal_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_internal_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StreamClose) String() string {
@@ -776,7 +761,7 @@ func (*StreamClose) ProtoMessage() {}
func (x *StreamClose) ProtoReflect() protoreflect.Message {
mi := &file_internal_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -807,7 +792,7 @@ func (x *StreamClose) GetCode() string {
var File_internal_proto protoreflect.FileDescriptor
var file_internal_proto_rawDesc = []byte{
var file_internal_proto_rawDesc = string([]byte{
0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e,
@@ -840,7 +825,7 @@ var file_internal_proto_rawDesc = []byte{
0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xde, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x99, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
@@ -854,77 +839,81 @@ var file_internal_proto_rawDesc = []byte{
0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x61, 0x77, 0x5f, 0x72, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x72, 0x61, 0x77, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x66, 0x0a, 0x0c, 0x43, 0x6c, 0x61, 0x69, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65,
0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x18,
0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x08, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x22,
0x4b, 0x0a, 0x0d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12,
0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0xb6, 0x02, 0x0a,
0x06, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65,
0x61, 0x6d, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06,
0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78,
0x70, 0x69, 0x72, 0x79, 0x12, 0x2a, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x6f, 0x70, 0x65, 0x6e,
0x12, 0x33, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x03, 0x61, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x03, 0x61, 0x63, 0x6b, 0x12, 0x2d,
0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43,
0x6c, 0x6f, 0x73, 0x65, 0x48, 0x00, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x42, 0x06, 0x0a,
0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xa2, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
0x4f, 0x70, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a,
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x22, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x4f, 0x70, 0x65, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a,
0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x60, 0x0a, 0x0d, 0x53, 0x74,
0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x6e, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72,
0x61, 0x77, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x0a, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0b, 0x0a, 0x09,
0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41, 0x63, 0x6b, 0x22, 0x37, 0x0a, 0x0b, 0x53, 0x74, 0x72,
0x65, 0x61, 0x6d, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12,
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2f, 0x69,
0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72,
0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69,
0x6c, 0x73, 0x22, 0x66, 0x0a, 0x0c, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a,
0x0a, 0x08, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02,
0x52, 0x08, 0x61, 0x66, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x79, 0x22, 0x4b, 0x0a, 0x0d, 0x43, 0x6c,
0x61, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65,
0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0xb6, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x65,
0x61, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x12,
0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x17,
0x0a, 0x07, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
0x06, 0x73, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72,
0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12,
0x2a, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f,
0x70, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x12, 0x33, 0x0a, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69,
0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x12, 0x27, 0x0a, 0x03, 0x61, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x41,
0x63, 0x6b, 0x48, 0x00, 0x52, 0x03, 0x61, 0x63, 0x6b, 0x12, 0x2d, 0x0a, 0x05, 0x63, 0x6c, 0x6f,
0x73, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x48,
0x00, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79,
0x22, 0xa2, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x65, 0x6e, 0x12,
0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4f, 0x70, 0x65, 0x6e,
0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08,
0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x60, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x61, 0x77, 0x5f, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x61, 0x77,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x53, 0x74, 0x72, 0x65, 0x61,
0x6d, 0x41, 0x63, 0x6b, 0x22, 0x37, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6c,
0x6f, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x23, 0x5a,
0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x76, 0x65,
0x6b, 0x69, 0x74, 0x2f, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
})
var (
file_internal_proto_rawDescOnce sync.Once
file_internal_proto_rawDescData = file_internal_proto_rawDesc
file_internal_proto_rawDescData []byte
)
func file_internal_proto_rawDescGZIP() []byte {
file_internal_proto_rawDescOnce.Do(func() {
file_internal_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_rawDescData)
file_internal_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_internal_proto_rawDesc), len(file_internal_proto_rawDesc)))
})
return file_internal_proto_rawDescData
}
var file_internal_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_internal_proto_goTypes = []interface{}{
var file_internal_proto_goTypes = []any{
(*Msg)(nil), // 0: internal.Msg
(*Channel)(nil), // 1: internal.Channel
(*Request)(nil), // 2: internal.Request
@@ -944,17 +933,18 @@ var file_internal_proto_depIdxs = []int32{
13, // 0: internal.Request.request:type_name -> google.protobuf.Any
11, // 1: internal.Request.metadata:type_name -> internal.Request.MetadataEntry
13, // 2: internal.Response.response:type_name -> google.protobuf.Any
7, // 3: internal.Stream.open:type_name -> internal.StreamOpen
8, // 4: internal.Stream.message:type_name -> internal.StreamMessage
9, // 5: internal.Stream.ack:type_name -> internal.StreamAck
10, // 6: internal.Stream.close:type_name -> internal.StreamClose
12, // 7: internal.StreamOpen.metadata:type_name -> internal.StreamOpen.MetadataEntry
13, // 8: internal.StreamMessage.message:type_name -> google.protobuf.Any
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
13, // 3: internal.Response.error_details:type_name -> google.protobuf.Any
7, // 4: internal.Stream.open:type_name -> internal.StreamOpen
8, // 5: internal.Stream.message:type_name -> internal.StreamMessage
9, // 6: internal.Stream.ack:type_name -> internal.StreamAck
10, // 7: internal.Stream.close:type_name -> internal.StreamClose
12, // 8: internal.StreamOpen.metadata:type_name -> internal.StreamOpen.MetadataEntry
13, // 9: internal.StreamMessage.message:type_name -> google.protobuf.Any
10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type
10, // [10:10] is the sub-list for extension type_name
10, // [10:10] is the sub-list for extension extendee
0, // [0:10] is the sub-list for field type_name
}
func init() { file_internal_proto_init() }
@@ -962,141 +952,7 @@ func file_internal_proto_init() {
if File_internal_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_internal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Msg); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Channel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Request); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Response); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ClaimRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ClaimResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Stream); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamOpen); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamAck); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_internal_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StreamClose); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_internal_proto_msgTypes[6].OneofWrappers = []interface{}{
file_internal_proto_msgTypes[6].OneofWrappers = []any{
(*Stream_Open)(nil),
(*Stream_Message)(nil),
(*Stream_Ack)(nil),
@@ -1106,7 +962,7 @@ func file_internal_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_internal_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_internal_proto_rawDesc), len(file_internal_proto_rawDesc)),
NumEnums: 0,
NumMessages: 13,
NumExtensions: 0,
@@ -1117,7 +973,6 @@ func file_internal_proto_init() {
MessageInfos: file_internal_proto_msgTypes,
}.Build()
File_internal_proto = out.File
file_internal_proto_rawDesc = nil
file_internal_proto_goTypes = nil
file_internal_proto_depIdxs = nil
}
+1
View File
@@ -48,6 +48,7 @@ message Response {
string error = 5;
string code = 6;
bytes raw_response = 7;
repeated google.protobuf.Any error_details = 8;
}
message ClaimRequest {
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: empty_service.proto
@@ -24,6 +24,7 @@ import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
unsafe "unsafe"
)
const (
@@ -35,14 +36,14 @@ const (
var File_empty_service_proto protoreflect.FileDescriptor
var file_empty_service_proto_rawDesc = []byte{
var file_empty_service_proto_rawDesc = string([]byte{
0x0a, 0x13, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x65, 0x6d, 0x70, 0x74, 0x79,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x32, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x42, 0x10, 0x5a, 0x0e, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var file_empty_service_proto_goTypes = []any{}
var file_empty_service_proto_depIdxs = []int32{
@@ -62,7 +63,7 @@ func file_empty_service_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_empty_service_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_empty_service_proto_rawDesc), len(file_empty_service_proto_rawDesc)),
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
@@ -72,7 +73,6 @@ func file_empty_service_proto_init() {
DependencyIndexes: file_empty_service_proto_depIdxs,
}.Build()
File_empty_service_proto = out.File
file_empty_service_proto_rawDesc = nil
file_empty_service_proto_goTypes = nil
file_empty_service_proto_depIdxs = nil
}
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: service.proto
@@ -26,6 +26,7 @@ import (
emptypb "google.golang.org/protobuf/types/known/emptypb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
unsafe "unsafe"
)
const (
@@ -37,7 +38,7 @@ const (
var File_service_proto protoreflect.FileDescriptor
var file_service_proto_rawDesc = []byte{
var file_service_proto_rawDesc = string([]byte{
0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x1d, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
0x74, 0x65, 0x73, 0x74, 0x2e, 0x75, 0x73, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b,
@@ -52,7 +53,7 @@ var file_service_proto_rawDesc = []byte{
0x42, 0x1a, 0x5a, 0x18, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
})
var file_service_proto_goTypes = []any{
(*wrapperspb.StringValue)(nil), // 0: google.protobuf.StringValue
@@ -77,7 +78,7 @@ func file_service_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_proto_rawDesc), len(file_service_proto_rawDesc)),
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
@@ -87,7 +88,6 @@ func file_service_proto_init() {
DependencyIndexes: file_service_proto_depIdxs,
}.Build()
File_service_proto = out.File
file_service_proto_rawDesc = nil
file_service_proto_goTypes = nil
file_service_proto_depIdxs = nil
}
+7 -7
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: importable.proto
@@ -27,6 +27,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -74,7 +75,7 @@ func (*Msg) Descriptor() ([]byte, []int) {
var File_importable_proto protoreflect.FileDescriptor
var file_importable_proto_rawDesc = []byte{
var file_importable_proto_rawDesc = string([]byte{
0x0a, 0x10, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x1e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x62,
@@ -88,16 +89,16 @@ var file_importable_proto_rawDesc = []byte{
0x2f, 0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2f, 0x69,
0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x69, 0x6d, 0x70,
0x6f, 0x72, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_importable_proto_rawDescOnce sync.Once
file_importable_proto_rawDescData = file_importable_proto_rawDesc
file_importable_proto_rawDescData []byte
)
func file_importable_proto_rawDescGZIP() []byte {
file_importable_proto_rawDescOnce.Do(func() {
file_importable_proto_rawDescData = protoimpl.X.CompressGZIP(file_importable_proto_rawDescData)
file_importable_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_importable_proto_rawDesc), len(file_importable_proto_rawDesc)))
})
return file_importable_proto_rawDescData
}
@@ -125,7 +126,7 @@ func file_importable_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_importable_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_importable_proto_rawDesc), len(file_importable_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -136,7 +137,6 @@ func file_importable_proto_init() {
MessageInfos: file_importable_proto_msgTypes,
}.Build()
File_importable_proto = out.File
file_importable_proto_rawDesc = nil
file_importable_proto_goTypes = nil
file_importable_proto_depIdxs = nil
}
+5 -5
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: importer.proto
@@ -27,6 +27,7 @@ import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
unsafe "unsafe"
)
const (
@@ -38,7 +39,7 @@ const (
var File_importer_proto protoreflect.FileDescriptor
var file_importer_proto_rawDesc = []byte{
var file_importer_proto_rawDesc = string([]byte{
0x0a, 0x0e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x1c, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x10,
@@ -53,7 +54,7 @@ var file_importer_proto_rawDesc = []byte{
0x2f, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f,
0x74, 0x65, 0x73, 0x74, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var file_importer_proto_goTypes = []any{
(*importable.Msg)(nil), // 0: psrpc.internal.test.importable.Msg
@@ -77,7 +78,7 @@ func file_importer_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_importer_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_importer_proto_rawDesc), len(file_importer_proto_rawDesc)),
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
@@ -87,7 +88,6 @@ func file_importer_proto_init() {
DependencyIndexes: file_importer_proto_depIdxs,
}.Build()
File_importer_proto = out.File
file_importer_proto_rawDesc = nil
file_importer_proto_goTypes = nil
file_importer_proto_depIdxs = nil
}
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: importer_local.proto
@@ -24,6 +24,7 @@ import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
unsafe "unsafe"
)
const (
@@ -35,7 +36,7 @@ const (
var File_importer_local_proto protoreflect.FileDescriptor
var file_importer_local_proto_rawDesc = []byte{
var file_importer_local_proto_rawDesc = string([]byte{
0x0a, 0x14, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x69, 0x6d, 0x70, 0x6f,
@@ -52,7 +53,7 @@ var file_importer_local_proto_rawDesc = []byte{
0x73, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65,
0x73, 0x74, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61,
0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var file_importer_local_proto_goTypes = []any{
(*Msg)(nil), // 0: psrpc.internal.test.importer_local.Msg
@@ -77,7 +78,7 @@ func file_importer_local_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_importer_local_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_importer_local_proto_rawDesc), len(file_importer_local_proto_rawDesc)),
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
@@ -87,7 +88,6 @@ func file_importer_local_proto_init() {
DependencyIndexes: file_importer_local_proto_depIdxs,
}.Build()
File_importer_local_proto = out.File
file_importer_local_proto_rawDesc = nil
file_importer_local_proto_goTypes = nil
file_importer_local_proto_depIdxs = nil
}
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: importer_local_msgdef.proto
@@ -25,6 +25,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -72,7 +73,7 @@ func (*Msg) Descriptor() ([]byte, []int) {
var File_importer_local_msgdef_proto protoreflect.FileDescriptor
var file_importer_local_msgdef_proto_rawDesc = []byte{
var file_importer_local_msgdef_proto_rawDesc = string([]byte{
0x0a, 0x1b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
0x5f, 0x6d, 0x73, 0x67, 0x64, 0x65, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x22, 0x70,
0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65,
@@ -82,16 +83,16 @@ var file_importer_local_msgdef_proto_rawDesc = []byte{
0x73, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65,
0x73, 0x74, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61,
0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_importer_local_msgdef_proto_rawDescOnce sync.Once
file_importer_local_msgdef_proto_rawDescData = file_importer_local_msgdef_proto_rawDesc
file_importer_local_msgdef_proto_rawDescData []byte
)
func file_importer_local_msgdef_proto_rawDescGZIP() []byte {
file_importer_local_msgdef_proto_rawDescOnce.Do(func() {
file_importer_local_msgdef_proto_rawDescData = protoimpl.X.CompressGZIP(file_importer_local_msgdef_proto_rawDescData)
file_importer_local_msgdef_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_importer_local_msgdef_proto_rawDesc), len(file_importer_local_msgdef_proto_rawDesc)))
})
return file_importer_local_msgdef_proto_rawDescData
}
@@ -117,7 +118,7 @@ func file_importer_local_msgdef_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_importer_local_msgdef_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_importer_local_msgdef_proto_rawDesc), len(file_importer_local_msgdef_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -128,7 +129,6 @@ func file_importer_local_msgdef_proto_init() {
MessageInfos: file_importer_local_msgdef_proto_msgTypes,
}.Build()
File_importer_local_msgdef_proto = out.File
file_importer_local_msgdef_proto_rawDesc = nil
file_importer_local_msgdef_proto_goTypes = nil
file_importer_local_msgdef_proto_depIdxs = nil
}
+5 -5
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: x/x.proto
@@ -25,6 +25,7 @@ import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
unsafe "unsafe"
)
const (
@@ -36,7 +37,7 @@ const (
var File_x_x_proto protoreflect.FileDescriptor
var file_x_x_proto_rawDesc = []byte{
var file_x_x_proto_rawDesc = string([]byte{
0x0a, 0x09, 0x78, 0x2f, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x23, 0x70, 0x73, 0x72,
0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74,
0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x78,
@@ -50,7 +51,7 @@ var file_x_x_proto_rawDesc = []byte{
0x59, 0x42, 0x1f, 0x5a, 0x1d, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x77, 0x69, 0x6c, 0x6c, 0x2f, 0x62, 0x65, 0x2f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64,
0x2f, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var file_x_x_proto_goTypes = []any{
(*y.MsgY)(nil), // 0: psrpc.internal.test.importmapping.y.MsgY
@@ -74,7 +75,7 @@ func file_x_x_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_x_x_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_x_x_proto_rawDesc), len(file_x_x_proto_rawDesc)),
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
@@ -84,7 +85,6 @@ func file_x_x_proto_init() {
DependencyIndexes: file_x_x_proto_depIdxs,
}.Build()
File_x_x_proto = out.File
file_x_x_proto_rawDesc = nil
file_x_x_proto_goTypes = nil
file_x_x_proto_depIdxs = nil
}
+7 -7
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: y/y.proto
@@ -25,6 +25,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -72,7 +73,7 @@ func (*MsgY) Descriptor() ([]byte, []int) {
var File_y_y_proto protoreflect.FileDescriptor
var file_y_y_proto_rawDesc = []byte{
var file_y_y_proto_rawDesc = string([]byte{
0x0a, 0x09, 0x79, 0x2f, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x23, 0x70, 0x73, 0x72,
0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74,
0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x79,
@@ -80,16 +81,16 @@ var file_y_y_proto_rawDesc = []byte{
0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x69, 0x6c, 0x6c, 0x2f, 0x62, 0x65, 0x2f,
0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x2f, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
})
var (
file_y_y_proto_rawDescOnce sync.Once
file_y_y_proto_rawDescData = file_y_y_proto_rawDesc
file_y_y_proto_rawDescData []byte
)
func file_y_y_proto_rawDescGZIP() []byte {
file_y_y_proto_rawDescOnce.Do(func() {
file_y_y_proto_rawDescData = protoimpl.X.CompressGZIP(file_y_y_proto_rawDescData)
file_y_y_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_y_y_proto_rawDesc), len(file_y_y_proto_rawDesc)))
})
return file_y_y_proto_rawDescData
}
@@ -115,7 +116,7 @@ func file_y_y_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_y_y_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_y_y_proto_rawDesc), len(file_y_y_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -126,7 +127,6 @@ func file_y_y_proto_init() {
MessageInfos: file_y_y_proto_msgTypes,
}.Build()
File_y_y_proto = out.File
file_y_y_proto_rawDesc = nil
file_y_y_proto_goTypes = nil
file_y_y_proto_depIdxs = nil
}
+7 -7
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: multiple1.proto
@@ -27,6 +27,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -74,7 +75,7 @@ func (*Msg1) Descriptor() ([]byte, []int) {
var File_multiple1_proto protoreflect.FileDescriptor
var file_multiple1_proto_rawDesc = []byte{
var file_multiple1_proto_rawDesc = string([]byte{
0x0a, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x1c, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x22,
@@ -86,16 +87,16 @@ var file_multiple1_proto_rawDesc = []byte{
0x74, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x31, 0x42,
0x0b, 0x5a, 0x09, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_multiple1_proto_rawDescOnce sync.Once
file_multiple1_proto_rawDescData = file_multiple1_proto_rawDesc
file_multiple1_proto_rawDescData []byte
)
func file_multiple1_proto_rawDescGZIP() []byte {
file_multiple1_proto_rawDescOnce.Do(func() {
file_multiple1_proto_rawDescData = protoimpl.X.CompressGZIP(file_multiple1_proto_rawDescData)
file_multiple1_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_multiple1_proto_rawDesc), len(file_multiple1_proto_rawDesc)))
})
return file_multiple1_proto_rawDescData
}
@@ -123,7 +124,7 @@ func file_multiple1_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_multiple1_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_multiple1_proto_rawDesc), len(file_multiple1_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -134,7 +135,6 @@ func file_multiple1_proto_init() {
MessageInfos: file_multiple1_proto_msgTypes,
}.Build()
File_multiple1_proto = out.File
file_multiple1_proto_rawDesc = nil
file_multiple1_proto_goTypes = nil
file_multiple1_proto_depIdxs = nil
}
+7 -7
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: multiple2.proto
@@ -27,6 +27,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -74,7 +75,7 @@ func (*Msg2) Descriptor() ([]byte, []int) {
var File_multiple2_proto protoreflect.FileDescriptor
var file_multiple2_proto_rawDesc = []byte{
var file_multiple2_proto_rawDesc = string([]byte{
0x0a, 0x0f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x1c, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x1a,
@@ -93,16 +94,16 @@ var file_multiple2_proto_rawDesc = []byte{
0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x2e, 0x4d,
0x73, 0x67, 0x31, 0x42, 0x0b, 0x5a, 0x09, 0x2f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_multiple2_proto_rawDescOnce sync.Once
file_multiple2_proto_rawDescData = file_multiple2_proto_rawDesc
file_multiple2_proto_rawDescData []byte
)
func file_multiple2_proto_rawDescGZIP() []byte {
file_multiple2_proto_rawDescOnce.Do(func() {
file_multiple2_proto_rawDescData = protoimpl.X.CompressGZIP(file_multiple2_proto_rawDescData)
file_multiple2_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_multiple2_proto_rawDesc), len(file_multiple2_proto_rawDesc)))
})
return file_multiple2_proto_rawDescData
}
@@ -134,7 +135,7 @@ func file_multiple2_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_multiple2_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_multiple2_proto_rawDesc), len(file_multiple2_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -145,7 +146,6 @@ func file_multiple2_proto_init() {
MessageInfos: file_multiple2_proto_msgTypes,
}.Build()
File_multiple2_proto = out.File
file_multiple2_proto_rawDesc = nil
file_multiple2_proto_goTypes = nil
file_multiple2_proto_depIdxs = nil
}
+70 -60
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: my_service.proto
@@ -26,6 +26,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -73,6 +74,7 @@ func (*Ignored) Descriptor() ([]byte, []int) {
type MyRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
ReturnError bool `protobuf:"varint,1,opt,name=return_error,json=returnError,proto3" json:"return_error,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -107,6 +109,13 @@ func (*MyRequest) Descriptor() ([]byte, []int) {
return file_my_service_proto_rawDescGZIP(), []int{1}
}
func (x *MyRequest) GetReturnError() bool {
if x != nil {
return x.ReturnError
}
return false
}
type MyResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
@@ -253,81 +262,83 @@ func (*MyServerMessage) Descriptor() ([]byte, []int) {
var File_my_service_proto protoreflect.FileDescriptor
var file_my_service_proto_rawDesc = []byte{
var file_my_service_proto_rawDesc = string([]byte{
0x0a, 0x10, 0x6d, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x21, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x09, 0x0a, 0x07, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x22,
0x0b, 0x0a, 0x09, 0x4d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0c, 0x0a, 0x0a,
0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0a, 0x0a, 0x08, 0x4d, 0x79,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x79, 0x43, 0x6c, 0x69, 0x65,
0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x79, 0x53,
0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xc4, 0x06, 0x0a,
0x09, 0x4d, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a, 0x09, 0x4e, 0x6f,
0x72, 0x6d, 0x61, 0x6c, 0x52, 0x50, 0x43, 0x12, 0x2c, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e,
0x2e, 0x0a, 0x09, 0x4d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c,
0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22,
0x0c, 0x0a, 0x0a, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0a, 0x0a,
0x08, 0x4d, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x79, 0x43,
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x11, 0x0a, 0x0f,
0x4d, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32,
0xc4, 0x06, 0x0a, 0x09, 0x4d, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 0x0a,
0x09, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x52, 0x50, 0x43, 0x12, 0x2c, 0x2e, 0x70, 0x73, 0x72,
0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74,
0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d,
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63,
0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x65, 0x6e,
0x73, 0x69, 0x76, 0x65, 0x52, 0x50, 0x43, 0x12, 0x2c, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74,
0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x76,
0x65, 0x52, 0x50, 0x43, 0x12, 0x2c, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x40, 0x01, 0x12, 0x6f, 0x0a, 0x08, 0x47, 0x65, 0x74,
0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74,
0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x40, 0x02, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x45,
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x32,
0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2e, 0x4d, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x1a, 0x32, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x20, 0x01, 0x12, 0x77,
0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73,
0x12, 0x2c, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d,
0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x08, 0xb2,
0x89, 0x01, 0x04, 0x10, 0x01, 0x40, 0x02, 0x12, 0x70, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x63, 0x65,
0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x40, 0x01, 0x12, 0x6f, 0x0a, 0x08,
0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63,
0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x67, 0x6e,
0x6f, 0x72, 0x65, 0x64, 0x1a, 0x2b, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f,
0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x08, 0x01, 0x12, 0x78, 0x0a, 0x11, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2a,
0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2e, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x1a, 0x2b, 0x2e, 0x70, 0x73, 0x72,
0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74,
0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d,
0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x0a, 0xb2, 0x89, 0x01, 0x06, 0x08, 0x01, 0x10,
0x01, 0x40, 0x02, 0x42, 0x0d, 0x5a, 0x0b, 0x2f, 0x6d, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69,
0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x40, 0x02, 0x12, 0x81, 0x01,
0x0a, 0x0f, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x73, 0x12, 0x32, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x32, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74,
0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x53, 0x65, 0x72, 0x76,
0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x20,
0x01, 0x12, 0x77, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74,
0x61, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65,
0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x08, 0xb2, 0x89, 0x01, 0x04, 0x10, 0x01, 0x40, 0x02, 0x12, 0x70, 0x0a, 0x0d, 0x50, 0x72,
0x6f, 0x63, 0x65, 0x73, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x70, 0x73,
0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73,
0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x1a, 0x2b, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x79, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x22, 0x06, 0xb2, 0x89, 0x01, 0x02, 0x08, 0x01, 0x12, 0x78, 0x0a, 0x11,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74,
0x65, 0x12, 0x2a, 0x2e, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x1a, 0x2b, 0x2e,
0x70, 0x73, 0x72, 0x70, 0x63, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74,
0x65, 0x73, 0x74, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x2e, 0x4d, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x0a, 0xb2, 0x89, 0x01, 0x06,
0x08, 0x01, 0x10, 0x01, 0x40, 0x02, 0x42, 0x0d, 0x5a, 0x0b, 0x2f, 0x6d, 0x79, 0x5f, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
})
var (
file_my_service_proto_rawDescOnce sync.Once
file_my_service_proto_rawDescData = file_my_service_proto_rawDesc
file_my_service_proto_rawDescData []byte
)
func file_my_service_proto_rawDescGZIP() []byte {
file_my_service_proto_rawDescOnce.Do(func() {
file_my_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_my_service_proto_rawDescData)
file_my_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_my_service_proto_rawDesc), len(file_my_service_proto_rawDesc)))
})
return file_my_service_proto_rawDescData
}
@@ -372,7 +383,7 @@ func file_my_service_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_my_service_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_my_service_proto_rawDesc), len(file_my_service_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
@@ -383,7 +394,6 @@ func file_my_service_proto_init() {
MessageInfos: file_my_service_proto_msgTypes,
}.Build()
File_my_service_proto = out.File
file_my_service_proto_rawDesc = nil
file_my_service_proto_goTypes = nil
file_my_service_proto_depIdxs = nil
}
+3 -1
View File
@@ -63,7 +63,9 @@ service MyService {
}
message Ignored {}
message MyRequest {}
message MyRequest {
bool return_error = 1;
}
message MyResponse {}
message MyUpdate {}
message MyClientMessage {}
+23 -1
View File
@@ -16,12 +16,14 @@ package my_service
import (
"context"
"errors"
"math/rand"
"sync"
"testing"
"time"
"github.com/stretchr/testify/require"
"google.golang.org/grpc/codes"
"google.golang.org/protobuf/proto"
"github.com/livekit/psrpc"
@@ -164,6 +166,23 @@ func testGeneratedService(t *testing.T, bus func(t testing.TB) bus.MessageBus) {
requireTwo(t, subA, subB)
require.NoError(t, subA.Close())
require.NoError(t, subB.Close())
// rpc NormalRPC(MyRequest) returns (MyResponse);
_, err = cA.NormalRPC(ctx, &MyRequest{ReturnError: true})
require.Error(t, err)
e, ok := err.(psrpc.Error)
require.True(t, ok)
require.Equal(t, psrpc.FailedPrecondition, e.Code())
require.Equal(t, "requested error", e.Error())
details := e.Details()
require.Equal(t, 1, len(details))
require.True(t, proto.Equal(&MyRequest{ReturnError: true}, details[0].(proto.Message)))
st := e.GRPCStatus()
require.Equal(t, codes.FailedPrecondition, st.Code())
require.Equal(t, "requested error", st.Message())
details = st.Details()
require.Equal(t, 1, len(details))
require.True(t, proto.Equal(&MyRequest{ReturnError: true}, details[0].(proto.Message)))
}
func requireTwo(t *testing.T, subA, subB psrpc.Subscription[*MyUpdate]) {
@@ -214,7 +233,10 @@ type MyService struct {
counts map[string]int
}
func (s *MyService) NormalRPC(_ context.Context, _ *MyRequest) (*MyResponse, error) {
func (s *MyService) NormalRPC(_ context.Context, req *MyRequest) (*MyResponse, error) {
if req.ReturnError {
return nil, psrpc.NewError(psrpc.FailedPrecondition, errors.New("requested error"), req)
}
s.Lock()
s.counts["NormalRPC"]++
s.Unlock()
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: no_package_name.proto
@@ -25,6 +25,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -72,7 +73,7 @@ func (*Msg) Descriptor() ([]byte, []int) {
var File_no_package_name_proto protoreflect.FileDescriptor
var file_no_package_name_proto_rawDesc = []byte{
var file_no_package_name_proto_rawDesc = string([]byte{
0x0a, 0x15, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x32, 0x19,
0x0a, 0x03, 0x53, 0x76, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x04, 0x2e,
@@ -81,16 +82,16 @@ var file_no_package_name_proto_rawDesc = []byte{
0x70, 0x73, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74,
0x65, 0x73, 0x74, 0x2f, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_no_package_name_proto_rawDescOnce sync.Once
file_no_package_name_proto_rawDescData = file_no_package_name_proto_rawDesc
file_no_package_name_proto_rawDescData []byte
)
func file_no_package_name_proto_rawDescGZIP() []byte {
file_no_package_name_proto_rawDescOnce.Do(func() {
file_no_package_name_proto_rawDescData = protoimpl.X.CompressGZIP(file_no_package_name_proto_rawDescData)
file_no_package_name_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_no_package_name_proto_rawDesc), len(file_no_package_name_proto_rawDesc)))
})
return file_no_package_name_proto_rawDescData
}
@@ -118,7 +119,7 @@ func file_no_package_name_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_no_package_name_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_no_package_name_proto_rawDesc), len(file_no_package_name_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -129,7 +130,6 @@ func file_no_package_name_proto_init() {
MessageInfos: file_no_package_name_proto_msgTypes,
}.Build()
File_no_package_name_proto = out.File
file_no_package_name_proto_rawDesc = nil
file_no_package_name_proto_goTypes = nil
file_no_package_name_proto_depIdxs = nil
}
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: no_package_name_importer/no_package_name_importer.proto
@@ -25,6 +25,7 @@ import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
unsafe "unsafe"
)
const (
@@ -36,7 +37,7 @@ const (
var File_no_package_name_importer_no_package_name_importer_proto protoreflect.FileDescriptor
var file_no_package_name_importer_no_package_name_importer_proto_rawDesc = []byte{
var file_no_package_name_importer_no_package_name_importer_proto_rawDesc = string([]byte{
0x0a, 0x37, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x6e, 0x6f, 0x5f, 0x70, 0x61,
0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72,
@@ -50,7 +51,7 @@ var file_no_package_name_importer_no_package_name_importer_proto_rawDesc = []byt
0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x6e, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b,
0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65,
0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var file_no_package_name_importer_no_package_name_importer_proto_goTypes = []any{
(*no_package_name.Msg)(nil), // 0: Msg
@@ -74,7 +75,7 @@ func file_no_package_name_importer_no_package_name_importer_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_no_package_name_importer_no_package_name_importer_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_no_package_name_importer_no_package_name_importer_proto_rawDesc), len(file_no_package_name_importer_no_package_name_importer_proto_rawDesc)),
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
@@ -84,7 +85,6 @@ func file_no_package_name_importer_no_package_name_importer_proto_init() {
DependencyIndexes: file_no_package_name_importer_no_package_name_importer_proto_depIdxs,
}.Build()
File_no_package_name_importer_no_package_name_importer_proto = out.File
file_no_package_name_importer_no_package_name_importer_proto_rawDesc = nil
file_no_package_name_importer_no_package_name_importer_proto_goTypes = nil
file_no_package_name_importer_no_package_name_importer_proto_depIdxs = nil
}
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: service_method_same_name.proto
@@ -25,6 +25,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -72,7 +73,7 @@ func (*Msg) Descriptor() ([]byte, []int) {
var File_service_method_same_name_proto protoreflect.FileDescriptor
var file_service_method_same_name_proto_rawDesc = []byte{
var file_service_method_same_name_proto_rawDesc = string([]byte{
0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x5f, 0x73, 0x61, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x32, 0x1c, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12,
@@ -80,16 +81,16 @@ var file_service_method_same_name_proto_rawDesc = []byte{
0x4d, 0x73, 0x67, 0x22, 0x00, 0x42, 0x1b, 0x5a, 0x19, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x61, 0x6d, 0x65, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_service_method_same_name_proto_rawDescOnce sync.Once
file_service_method_same_name_proto_rawDescData = file_service_method_same_name_proto_rawDesc
file_service_method_same_name_proto_rawDescData []byte
)
func file_service_method_same_name_proto_rawDescGZIP() []byte {
file_service_method_same_name_proto_rawDescOnce.Do(func() {
file_service_method_same_name_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_method_same_name_proto_rawDescData)
file_service_method_same_name_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_service_method_same_name_proto_rawDesc), len(file_service_method_same_name_proto_rawDesc)))
})
return file_service_method_same_name_proto_rawDescData
}
@@ -117,7 +118,7 @@ func file_service_method_same_name_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_method_same_name_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_method_same_name_proto_rawDesc), len(file_service_method_same_name_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -128,7 +129,6 @@ func file_service_method_same_name_proto_init() {
MessageInfos: file_service_method_same_name_proto_msgTypes,
}.Build()
File_service_method_same_name_proto = out.File
file_service_method_same_name_proto_rawDesc = nil
file_service_method_same_name_proto_goTypes = nil
file_service_method_same_name_proto_depIdxs = nil
}
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.3
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: snake_case_names.proto
@@ -28,6 +28,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -179,7 +180,7 @@ func (x *MakeHatArgsV1_SizeV1) GetInches() int32 {
var File_snake_case_names_proto protoreflect.FileDescriptor
var file_snake_case_names_proto_rawDesc = []byte{
var file_snake_case_names_proto_rawDesc = string([]byte{
0x0a, 0x16, 0x73, 0x6e, 0x61, 0x6b, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2e,
0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x73, 0x6e,
@@ -204,16 +205,16 @@ var file_snake_case_names_proto_rawDesc = []byte{
0x31, 0x2e, 0x48, 0x61, 0x74, 0x5f, 0x76, 0x31, 0x42, 0x14, 0x5a, 0x12, 0x2f, 0x3b, 0x73, 0x6e,
0x61, 0x6b, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_snake_case_names_proto_rawDescOnce sync.Once
file_snake_case_names_proto_rawDescData = file_snake_case_names_proto_rawDesc
file_snake_case_names_proto_rawDescData []byte
)
func file_snake_case_names_proto_rawDescGZIP() []byte {
file_snake_case_names_proto_rawDescOnce.Do(func() {
file_snake_case_names_proto_rawDescData = protoimpl.X.CompressGZIP(file_snake_case_names_proto_rawDescData)
file_snake_case_names_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_snake_case_names_proto_rawDesc), len(file_snake_case_names_proto_rawDesc)))
})
return file_snake_case_names_proto_rawDescData
}
@@ -243,7 +244,7 @@ func file_snake_case_names_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_snake_case_names_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_snake_case_names_proto_rawDesc), len(file_snake_case_names_proto_rawDesc)),
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
@@ -254,7 +255,6 @@ func file_snake_case_names_proto_init() {
MessageInfos: file_snake_case_names_proto_msgTypes,
}.Build()
File_snake_case_names_proto = out.File
file_snake_case_names_proto_rawDesc = nil
file_snake_case_names_proto_goTypes = nil
file_snake_case_names_proto_depIdxs = nil
}
+1 -1
View File
@@ -129,7 +129,7 @@ func (m *multiRPC[ResponseType]) handleResponses(
var v ResponseType
var err error
if res.Error != "" {
err = psrpc.NewErrorFromResponse(res.Code, res.Error)
err = psrpc.NewErrorFromResponse(res.Code, res.Error, res.ErrorDetails...)
} else {
v, err = bus.DeserializePayload[ResponseType](res.RawResponse)
if err != nil {
+1 -1
View File
@@ -141,7 +141,7 @@ func newRPC[ResponseType proto.Message](c *RPCClient, i *info.RequestInfo) psrpc
select {
case res := <-resChan:
if res.Error != "" {
err = psrpc.NewErrorFromResponse(res.Code, res.Error)
err = psrpc.NewErrorFromResponse(res.Code, res.Error, res.ErrorDetails...)
} else {
response, err = bus.DeserializePayload[ResponseType](res.RawResponse)
if err != nil {
+1
View File
@@ -262,6 +262,7 @@ func (h *rpcHandlerImpl[RequestType, ResponseType]) sendResponse(
if errors.As(err, &e) {
res.Error = e.Error()
res.Code = string(e.Code())
res.ErrorDetails = append(res.ErrorDetails, e.DetailsProto()...)
} else {
res.Error = err.Error()
res.Code = string(psrpc.Unknown)
+41 -67
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: options.proto
@@ -26,6 +26,7 @@ import (
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -86,10 +87,7 @@ func (Routing) EnumDescriptor() ([]byte, []int) {
}
type Options struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// This method is a pub/sub.
Subscription bool `protobuf:"varint,1,opt,name=subscription,proto3" json:"subscription,omitempty"`
// This method uses topics.
@@ -101,21 +99,21 @@ type Options struct {
Type Routing `protobuf:"varint,8,opt,name=type,proto3,enum=psrpc.Routing" json:"type,omitempty"`
// deprecated
//
// Types that are assignable to Routing:
// Types that are valid to be assigned to Routing:
//
// *Options_Multi
// *Options_AffinityFunc
// *Options_Queue
Routing isOptions_Routing `protobuf_oneof:"routing"`
Routing isOptions_Routing `protobuf_oneof:"routing"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Options) Reset() {
*x = Options{}
if protoimpl.UnsafeEnabled {
mi := &file_options_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_options_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Options) String() string {
@@ -126,7 +124,7 @@ func (*Options) ProtoMessage() {}
func (x *Options) ProtoReflect() protoreflect.Message {
mi := &file_options_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -176,30 +174,36 @@ func (x *Options) GetType() Routing {
return Routing_QUEUE
}
func (m *Options) GetRouting() isOptions_Routing {
if m != nil {
return m.Routing
func (x *Options) GetRouting() isOptions_Routing {
if x != nil {
return x.Routing
}
return nil
}
func (x *Options) GetMulti() bool {
if x, ok := x.GetRouting().(*Options_Multi); ok {
return x.Multi
if x != nil {
if x, ok := x.Routing.(*Options_Multi); ok {
return x.Multi
}
}
return false
}
func (x *Options) GetAffinityFunc() bool {
if x, ok := x.GetRouting().(*Options_AffinityFunc); ok {
return x.AffinityFunc
if x != nil {
if x, ok := x.Routing.(*Options_AffinityFunc); ok {
return x.AffinityFunc
}
}
return false
}
func (x *Options) GetQueue() bool {
if x, ok := x.GetRouting().(*Options_Queue); ok {
return x.Queue
if x != nil {
if x, ok := x.Routing.(*Options_Queue); ok {
return x.Queue
}
}
return false
}
@@ -231,10 +235,7 @@ func (*Options_AffinityFunc) isOptions_Routing() {}
func (*Options_Queue) isOptions_Routing() {}
type TopicParamOptions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
state protoimpl.MessageState `protogen:"open.v1"`
// The rpc can be registered/deregistered atomically with other group members
Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
// The topic is composed of one or more string-like parameters.
@@ -242,16 +243,16 @@ type TopicParamOptions struct {
// The topic parameters have associated string-like type parameters
Typed bool `protobuf:"varint,3,opt,name=typed,proto3" json:"typed,omitempty"`
// At most one server will be registered for each topic
SingleServer bool `protobuf:"varint,4,opt,name=single_server,json=singleServer,proto3" json:"single_server,omitempty"`
SingleServer bool `protobuf:"varint,4,opt,name=single_server,json=singleServer,proto3" json:"single_server,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TopicParamOptions) Reset() {
*x = TopicParamOptions{}
if protoimpl.UnsafeEnabled {
mi := &file_options_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_options_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TopicParamOptions) String() string {
@@ -262,7 +263,7 @@ func (*TopicParamOptions) ProtoMessage() {}
func (x *TopicParamOptions) ProtoReflect() protoreflect.Message {
mi := &file_options_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -324,7 +325,7 @@ var (
var File_options_proto protoreflect.FileDescriptor
var file_options_proto_rawDesc = []byte{
var file_options_proto_rawDesc = string([]byte{
0x0a, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x05, 0x70, 0x73, 0x72, 0x70, 0x63, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
@@ -367,23 +368,23 @@ var file_options_proto_rawDesc = []byte{
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x70, 0x73, 0x72, 0x70,
0x63, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
})
var (
file_options_proto_rawDescOnce sync.Once
file_options_proto_rawDescData = file_options_proto_rawDesc
file_options_proto_rawDescData []byte
)
func file_options_proto_rawDescGZIP() []byte {
file_options_proto_rawDescOnce.Do(func() {
file_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_options_proto_rawDescData)
file_options_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_options_proto_rawDesc), len(file_options_proto_rawDesc)))
})
return file_options_proto_rawDescData
}
var file_options_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_options_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_options_proto_goTypes = []interface{}{
var file_options_proto_goTypes = []any{
(Routing)(0), // 0: psrpc.Routing
(*Options)(nil), // 1: psrpc.Options
(*TopicParamOptions)(nil), // 2: psrpc.TopicParamOptions
@@ -406,33 +407,7 @@ func file_options_proto_init() {
if File_options_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Options); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_options_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TopicParamOptions); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_options_proto_msgTypes[0].OneofWrappers = []interface{}{
file_options_proto_msgTypes[0].OneofWrappers = []any{
(*Options_Multi)(nil),
(*Options_AffinityFunc)(nil),
(*Options_Queue)(nil),
@@ -441,7 +416,7 @@ func file_options_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_options_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_options_proto_rawDesc), len(file_options_proto_rawDesc)),
NumEnums: 1,
NumMessages: 2,
NumExtensions: 1,
@@ -454,7 +429,6 @@ func file_options_proto_init() {
ExtensionInfos: file_options_proto_extTypes,
}.Build()
File_options_proto = out.File
file_options_proto_rawDesc = nil
file_options_proto_goTypes = nil
file_options_proto_depIdxs = nil
}
+17 -34
View File
@@ -14,7 +14,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc-gen-go v1.36.4
// protoc v4.23.4
// source: testutils.proto
@@ -25,6 +25,7 @@ import (
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
@@ -35,22 +36,19 @@ const (
)
type LaggyMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
state protoimpl.MessageState `protogen:"open.v1"`
Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
SentAt int64 `protobuf:"varint,2,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
unknownFields protoimpl.UnknownFields
Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
SentAt int64 `protobuf:"varint,2,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
sizeCache protoimpl.SizeCache
}
func (x *LaggyMessage) Reset() {
*x = LaggyMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_testutils_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
mi := &file_testutils_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LaggyMessage) String() string {
@@ -61,7 +59,7 @@ func (*LaggyMessage) ProtoMessage() {}
func (x *LaggyMessage) ProtoReflect() protoreflect.Message {
mi := &file_testutils_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
@@ -99,7 +97,7 @@ func (x *LaggyMessage) GetBody() []byte {
var File_testutils_proto protoreflect.FileDescriptor
var file_testutils_proto_rawDesc = []byte{
var file_testutils_proto_rawDesc = string([]byte{
0x0a, 0x0f, 0x74, 0x65, 0x73, 0x74, 0x75, 0x74, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x09, 0x74, 0x65, 0x73, 0x74, 0x75, 0x74, 0x69, 0x6c, 0x73, 0x22, 0x53, 0x0a, 0x0c,
0x4c, 0x61, 0x67, 0x67, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06,
@@ -110,22 +108,22 @@ var file_testutils_proto_rawDesc = []byte{
0x79, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6c, 0x69, 0x76, 0x65, 0x6b, 0x69, 0x74, 0x2f, 0x70, 0x73, 0x72, 0x70, 0x63, 0x2f, 0x74, 0x65,
0x73, 0x74, 0x75, 0x74, 0x69, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
})
var (
file_testutils_proto_rawDescOnce sync.Once
file_testutils_proto_rawDescData = file_testutils_proto_rawDesc
file_testutils_proto_rawDescData []byte
)
func file_testutils_proto_rawDescGZIP() []byte {
file_testutils_proto_rawDescOnce.Do(func() {
file_testutils_proto_rawDescData = protoimpl.X.CompressGZIP(file_testutils_proto_rawDescData)
file_testutils_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_testutils_proto_rawDesc), len(file_testutils_proto_rawDesc)))
})
return file_testutils_proto_rawDescData
}
var file_testutils_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_testutils_proto_goTypes = []interface{}{
var file_testutils_proto_goTypes = []any{
(*LaggyMessage)(nil), // 0: testutils.LaggyMessage
}
var file_testutils_proto_depIdxs = []int32{
@@ -141,25 +139,11 @@ func file_testutils_proto_init() {
if File_testutils_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_testutils_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LaggyMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_testutils_proto_rawDesc,
RawDescriptor: unsafe.Slice(unsafe.StringData(file_testutils_proto_rawDesc), len(file_testutils_proto_rawDesc)),
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
@@ -170,7 +154,6 @@ func file_testutils_proto_init() {
MessageInfos: file_testutils_proto_msgTypes,
}.Build()
File_testutils_proto = out.File
file_testutils_proto_rawDesc = nil
file_testutils_proto_goTypes = nil
file_testutils_proto_depIdxs = nil
}