Documentation ¶
Index ¶
- Constants
- func DRPCRegisterEndToEnd(mux drpc.Mux, impl DRPCEndToEndServer) error
- type DRPCEndToEndClient
- type DRPCEndToEndDescription
- type DRPCEndToEndServer
- type DRPCEndToEndUnimplementedServer
- type DRPCEndToEnd_MockStream
- type MockRequest
- func (*MockRequest) Descriptor() ([]byte, []int)
- func (m *MockRequest) GetBody() string
- func (*MockRequest) ProtoMessage()
- func (m *MockRequest) Reset()
- func (m *MockRequest) String() string
- func (m *MockRequest) XXX_DiscardUnknown()
- func (m *MockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MockRequest) XXX_Merge(src proto.Message)
- func (m *MockRequest) XXX_Size() int
- func (m *MockRequest) XXX_Unmarshal(b []byte) error
- type MockResponse
- func (*MockResponse) Descriptor() ([]byte, []int)
- func (m *MockResponse) GetReqBody() string
- func (*MockResponse) ProtoMessage()
- func (m *MockResponse) Reset()
- func (m *MockResponse) String() string
- func (m *MockResponse) XXX_DiscardUnknown()
- func (m *MockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MockResponse) XXX_Merge(src proto.Message)
- func (m *MockResponse) XXX_Size() int
- func (m *MockResponse) XXX_Unmarshal(b []byte) error
- type Server
Constants ¶
View Source
const ProtocolID protocol.ID = "bifrost/stream/drpc/e2e"
ProtocolID is the protocol ID for the end-to-end test.
Variables ¶
This section is empty.
Functions ¶
func DRPCRegisterEndToEnd ¶
func DRPCRegisterEndToEnd(mux drpc.Mux, impl DRPCEndToEndServer) error
Types ¶
type DRPCEndToEndClient ¶
type DRPCEndToEndClient interface { DRPCConn() drpc.Conn Mock(ctx context.Context, in *MockRequest) (*MockResponse, error) }
func NewDRPCEndToEndClient ¶
func NewDRPCEndToEndClient(cc drpc.Conn) DRPCEndToEndClient
type DRPCEndToEndDescription ¶
type DRPCEndToEndDescription struct{}
func (DRPCEndToEndDescription) NumMethods ¶
func (DRPCEndToEndDescription) NumMethods() int
type DRPCEndToEndServer ¶
type DRPCEndToEndServer interface {
Mock(context.Context, *MockRequest) (*MockResponse, error)
}
type DRPCEndToEndUnimplementedServer ¶
type DRPCEndToEndUnimplementedServer struct{}
func (*DRPCEndToEndUnimplementedServer) Mock ¶
func (s *DRPCEndToEndUnimplementedServer) Mock(context.Context, *MockRequest) (*MockResponse, error)
type DRPCEndToEnd_MockStream ¶
type DRPCEndToEnd_MockStream interface { drpc.Stream SendAndClose(*MockResponse) error }
type MockRequest ¶
type MockRequest struct { // Body is the body of the request. Body string `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
MockRequest is the mock request.
func (*MockRequest) Descriptor ¶
func (*MockRequest) Descriptor() ([]byte, []int)
func (*MockRequest) GetBody ¶
func (m *MockRequest) GetBody() string
func (*MockRequest) ProtoMessage ¶
func (*MockRequest) ProtoMessage()
func (*MockRequest) Reset ¶
func (m *MockRequest) Reset()
func (*MockRequest) String ¶
func (m *MockRequest) String() string
func (*MockRequest) XXX_DiscardUnknown ¶
func (m *MockRequest) XXX_DiscardUnknown()
func (*MockRequest) XXX_Marshal ¶
func (m *MockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MockRequest) XXX_Merge ¶
func (m *MockRequest) XXX_Merge(src proto.Message)
func (*MockRequest) XXX_Size ¶
func (m *MockRequest) XXX_Size() int
func (*MockRequest) XXX_Unmarshal ¶
func (m *MockRequest) XXX_Unmarshal(b []byte) error
type MockResponse ¶
type MockResponse struct { // ReqBody is the echoed request body. ReqBody string `protobuf:"bytes,1,opt,name=req_body,json=reqBody,proto3" json:"req_body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
MockResponse is the mock response.
func (*MockResponse) Descriptor ¶
func (*MockResponse) Descriptor() ([]byte, []int)
func (*MockResponse) GetReqBody ¶
func (m *MockResponse) GetReqBody() string
func (*MockResponse) ProtoMessage ¶
func (*MockResponse) ProtoMessage()
func (*MockResponse) Reset ¶
func (m *MockResponse) Reset()
func (*MockResponse) String ¶
func (m *MockResponse) String() string
func (*MockResponse) XXX_DiscardUnknown ¶
func (m *MockResponse) XXX_DiscardUnknown()
func (*MockResponse) XXX_Marshal ¶
func (m *MockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MockResponse) XXX_Merge ¶
func (m *MockResponse) XXX_Merge(src proto.Message)
func (*MockResponse) XXX_Size ¶
func (m *MockResponse) XXX_Size() int
func (*MockResponse) XXX_Unmarshal ¶
func (m *MockResponse) XXX_Unmarshal(b []byte) error
type Server ¶
type Server struct { }
Server is the e2e server.
func (*Server) Mock ¶
func (s *Server) Mock(ctx context.Context, req *MockRequest) (*MockResponse, error)
Mock performs the mock request.
Click to show internal directories.
Click to hide internal directories.