proto

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthRpc = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRpc   = fmt.Errorf("proto: integer overflow")
)
View Source
var RPCResponse_Status_name = map[int32]string{
	0:  "STATUS_UNKNOWN",
	1:  "STATUS_OK",
	2:  "STATUS_NOT_FOUND",
	4:  "STATUS_NOT_OK",
	5:  "STATUS_SERVER_ERROR",
	6:  "STATUS_TIMEOUT",
	7:  "STATUS_OVERLOADED_RETRY",
	9:  "STATUS_CLIENT_REQUEST_ERROR",
	10: "STATUS_CLIENT_NETWORK_ERROR",
	11: "STATUS_CLIENT_CALLED_WRONG",
	12: "STATUS_MISSED_DEADLINE",
	13: "STATUS_LOADSHED",
	14: "STATUS_UNHEALTHY",
}
View Source
var RPCResponse_Status_value = map[string]int32{
	"STATUS_UNKNOWN":              0,
	"STATUS_OK":                   1,
	"STATUS_NOT_FOUND":            2,
	"STATUS_NOT_OK":               4,
	"STATUS_SERVER_ERROR":         5,
	"STATUS_TIMEOUT":              6,
	"STATUS_OVERLOADED_RETRY":     7,
	"STATUS_CLIENT_REQUEST_ERROR": 9,
	"STATUS_CLIENT_NETWORK_ERROR": 10,
	"STATUS_CLIENT_CALLED_WRONG":  11,
	"STATUS_MISSED_DEADLINE":      12,
	"STATUS_LOADSHED":             13,
	"STATUS_UNHEALTHY":            14,
}

Functions

This section is empty.

Types

type RPCRequest

type RPCRequest struct {
	// A unique-ish ID for this RPC
	RpcId     *string `protobuf:"bytes,1,opt,name=rpc_id,json=rpcId" json:"rpc_id,omitempty"`
	Srvc      *string `protobuf:"bytes,2,req,name=srvc" json:"srvc,omitempty"`
	Procedure *string `protobuf:"bytes,3,req,name=procedure" json:"procedure,omitempty"`
	Data      []byte  `protobuf:"bytes,4,req,name=data" json:"data,omitempty"`
	Deadline  *int64  `protobuf:"varint,5,opt,name=deadline" json:"deadline,omitempty"`
	// (i.e. the server doesn't need to bother sending one)
	CallerId             *string  `protobuf:"bytes,6,opt,name=caller_id,json=callerId" json:"caller_id,omitempty"`
	WantTrace            *bool    `protobuf:"varint,7,opt,name=want_trace,json=wantTrace" json:"want_trace,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RPCRequest) Descriptor

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

func (*RPCRequest) GetCallerId

func (m *RPCRequest) GetCallerId() string

func (*RPCRequest) GetData

func (m *RPCRequest) GetData() []byte

func (*RPCRequest) GetDeadline

func (m *RPCRequest) GetDeadline() int64

func (*RPCRequest) GetProcedure

func (m *RPCRequest) GetProcedure() string

func (*RPCRequest) GetRpcId

func (m *RPCRequest) GetRpcId() string

func (*RPCRequest) GetSrvc

func (m *RPCRequest) GetSrvc() string

func (*RPCRequest) GetWantTrace

func (m *RPCRequest) GetWantTrace() bool

func (*RPCRequest) Marshal

func (m *RPCRequest) Marshal() (dAtA []byte, err error)

func (*RPCRequest) MarshalTo

func (m *RPCRequest) MarshalTo(dAtA []byte) (int, error)

func (*RPCRequest) ProtoMessage

func (*RPCRequest) ProtoMessage()

func (*RPCRequest) Reset

func (m *RPCRequest) Reset()

func (*RPCRequest) Size

func (m *RPCRequest) Size() (n int)

func (*RPCRequest) String

func (m *RPCRequest) String() string

func (*RPCRequest) Unmarshal

func (m *RPCRequest) Unmarshal(dAtA []byte) error

func (*RPCRequest) XXX_DiscardUnknown

func (m *RPCRequest) XXX_DiscardUnknown()

func (*RPCRequest) XXX_Marshal

func (m *RPCRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RPCRequest) XXX_Merge

func (m *RPCRequest) XXX_Merge(src proto.Message)

func (*RPCRequest) XXX_Size

func (m *RPCRequest) XXX_Size() int

func (*RPCRequest) XXX_Unmarshal

func (m *RPCRequest) XXX_Unmarshal(b []byte) error

type RPCResponse

type RPCResponse struct {
	RpcId                *string             `protobuf:"bytes,1,opt,name=rpc_id,json=rpcId" json:"rpc_id,omitempty"`
	ResponseData         []byte              `protobuf:"bytes,2,opt,name=response_data,json=responseData" json:"response_data,omitempty"`
	ResponseStatus       *RPCResponse_Status `` /* 127-byte string literal not displayed */
	ErrorMessage         *string             `protobuf:"bytes,4,opt,name=error_message,json=errorMessage" json:"error_message,omitempty"`
	Traceinfo            *TraceInfo          `protobuf:"bytes,5,opt,name=traceinfo" json:"traceinfo,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (*RPCResponse) Descriptor

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

func (*RPCResponse) GetErrorMessage

func (m *RPCResponse) GetErrorMessage() string

func (*RPCResponse) GetResponseData

func (m *RPCResponse) GetResponseData() []byte

func (*RPCResponse) GetResponseStatus

func (m *RPCResponse) GetResponseStatus() RPCResponse_Status

func (*RPCResponse) GetRpcId

func (m *RPCResponse) GetRpcId() string

func (*RPCResponse) GetTraceinfo

func (m *RPCResponse) GetTraceinfo() *TraceInfo

func (*RPCResponse) Marshal

func (m *RPCResponse) Marshal() (dAtA []byte, err error)

func (*RPCResponse) MarshalTo

func (m *RPCResponse) MarshalTo(dAtA []byte) (int, error)

func (*RPCResponse) ProtoMessage

func (*RPCResponse) ProtoMessage()

func (*RPCResponse) Reset

func (m *RPCResponse) Reset()

func (*RPCResponse) Size

func (m *RPCResponse) Size() (n int)

func (*RPCResponse) String

func (m *RPCResponse) String() string

func (*RPCResponse) Unmarshal

func (m *RPCResponse) Unmarshal(dAtA []byte) error

func (*RPCResponse) XXX_DiscardUnknown

func (m *RPCResponse) XXX_DiscardUnknown()

func (*RPCResponse) XXX_Marshal

func (m *RPCResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RPCResponse) XXX_Merge

func (m *RPCResponse) XXX_Merge(src proto.Message)

func (*RPCResponse) XXX_Size

func (m *RPCResponse) XXX_Size() int

func (*RPCResponse) XXX_Unmarshal

func (m *RPCResponse) XXX_Unmarshal(b []byte) error

type RPCResponse_Status

type RPCResponse_Status int32
const (
	// Default value
	RPCResponse_STATUS_UNKNOWN RPCResponse_Status = 0
	// a.k.a. 200
	RPCResponse_STATUS_OK RPCResponse_Status = 1
	// service/endpoint not found (a.k.a. 404)
	RPCResponse_STATUS_NOT_FOUND RPCResponse_Status = 2
	// The handler returned an error; see the error_message for a description (500). response_data may have content
	RPCResponse_STATUS_NOT_OK RPCResponse_Status = 4
	// An error happened in the clusterrpc implementation (500)
	RPCResponse_STATUS_SERVER_ERROR RPCResponse_Status = 5
	// The requested timeout has been expired
	RPCResponse_STATUS_TIMEOUT RPCResponse_Status = 6
	// The server is overloaded (503)
	RPCResponse_STATUS_OVERLOADED_RETRY RPCResponse_Status = 7
	// We couldn't even send the request (PB serialization error, ...)
	RPCResponse_STATUS_CLIENT_REQUEST_ERROR RPCResponse_Status = 9
	// We couldn't send the request because of network/socket issues.
	RPCResponse_STATUS_CLIENT_NETWORK_ERROR RPCResponse_Status = 10
	// Client function called in a wrong way (e.g. different lengt of raddrs
	// and rports slices to NewClientRR())
	RPCResponse_STATUS_CLIENT_CALLED_WRONG RPCResponse_Status = 11
	// Timeout somewhere in the call stack
	RPCResponse_STATUS_MISSED_DEADLINE RPCResponse_Status = 12
	// Loadshedding mode, not accepting requests right now
	RPCResponse_STATUS_LOADSHED RPCResponse_Status = 13
	// Health check failed
	RPCResponse_STATUS_UNHEALTHY RPCResponse_Status = 14
)

func (RPCResponse_Status) Enum

func (RPCResponse_Status) EnumDescriptor

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

func (RPCResponse_Status) String

func (x RPCResponse_Status) String() string

func (*RPCResponse_Status) UnmarshalJSON

func (x *RPCResponse_Status) UnmarshalJSON(data []byte) error

type TraceInfo

type TraceInfo struct {
	ReceivedTime         *int64       `protobuf:"varint,1,req,name=received_time,json=receivedTime" json:"received_time,omitempty"`
	RepliedTime          *int64       `protobuf:"varint,2,req,name=replied_time,json=repliedTime" json:"replied_time,omitempty"`
	MachineName          *string      `protobuf:"bytes,3,opt,name=machine_name,json=machineName" json:"machine_name,omitempty"`
	EndpointName         *string      `protobuf:"bytes,4,opt,name=endpoint_name,json=endpointName" json:"endpoint_name,omitempty"`
	ErrorMessage         *string      `protobuf:"bytes,5,opt,name=error_message,json=errorMessage" json:"error_message,omitempty"`
	Redirect             *string      `protobuf:"bytes,6,opt,name=redirect" json:"redirect,omitempty"`
	ChildCalls           []*TraceInfo `protobuf:"bytes,7,rep,name=child_calls,json=childCalls" json:"child_calls,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*TraceInfo) Descriptor

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

func (*TraceInfo) GetChildCalls

func (m *TraceInfo) GetChildCalls() []*TraceInfo

func (*TraceInfo) GetEndpointName

func (m *TraceInfo) GetEndpointName() string

func (*TraceInfo) GetErrorMessage

func (m *TraceInfo) GetErrorMessage() string

func (*TraceInfo) GetMachineName

func (m *TraceInfo) GetMachineName() string

func (*TraceInfo) GetReceivedTime

func (m *TraceInfo) GetReceivedTime() int64

func (*TraceInfo) GetRedirect

func (m *TraceInfo) GetRedirect() string

func (*TraceInfo) GetRepliedTime

func (m *TraceInfo) GetRepliedTime() int64

func (*TraceInfo) Marshal

func (m *TraceInfo) Marshal() (dAtA []byte, err error)

func (*TraceInfo) MarshalTo

func (m *TraceInfo) MarshalTo(dAtA []byte) (int, error)

func (*TraceInfo) ProtoMessage

func (*TraceInfo) ProtoMessage()

func (*TraceInfo) Reset

func (m *TraceInfo) Reset()

func (*TraceInfo) Size

func (m *TraceInfo) Size() (n int)

func (*TraceInfo) String

func (m *TraceInfo) String() string

func (*TraceInfo) Unmarshal

func (m *TraceInfo) Unmarshal(dAtA []byte) error

func (*TraceInfo) XXX_DiscardUnknown

func (m *TraceInfo) XXX_DiscardUnknown()

func (*TraceInfo) XXX_Marshal

func (m *TraceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TraceInfo) XXX_Merge

func (m *TraceInfo) XXX_Merge(src proto.Message)

func (*TraceInfo) XXX_Size

func (m *TraceInfo) XXX_Size() int

func (*TraceInfo) XXX_Unmarshal

func (m *TraceInfo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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