Documentation
¶
Overview ¶
Package mock is a generated GoMock package.
Index ¶
- Constants
- func GinNoblTypeLives() []*dot.TypeLives
- func HttpNoblConfigTypeLive() *dot.ConfigTypeLive
- func HttpNoblTypeLives() []*dot.TypeLives
- func ServerNoblConfigTypeLive() *dot.ConfigTypeLive
- func ServerNoblTypeLives() []*dot.TypeLives
- func StreamServerInterceptor() grpc.StreamServerInterceptor
- func UnaryServerInterceptor() grpc.UnaryServerInterceptor
- func WebSocketTypeLives() []*dot.TypeLives
- type ConfigNobl
- type MockServerNobl
- type MockServerNoblMockRecorder
- type ServerNobl
- type WebSocket
Constants ¶
const (
GinNoblTypeID = "3c9e8119-3d42-45bd-98f9-32939c895c6d"
)
const (
ServerNoblTypeID = "77a766e7-c288-413f-946b-bc9de6df3d70"
)
const (
WebSocketTypeID = "27709862-0a7b-48e9-8427-5bbc86760c41"
)
Variables ¶
This section is empty.
Functions ¶
func GinNoblTypeLives ¶
GinNoblTypeLives Data structure needed when generating newer component
func HttpNoblConfigTypeLive ¶
func HttpNoblConfigTypeLive() *dot.ConfigTypeLive
jayce edit return config of HttpNobl
func HttpNoblTypeLives ¶
HttpNoblTypeLives Data structure needed when generating newer component
func ServerNoblConfigTypeLive ¶
func ServerNoblConfigTypeLive() *dot.ConfigTypeLive
jayce edit return config of ServerNobl
func ServerNoblTypeLives ¶
Data structure needed when generating newer component
func StreamServerInterceptor ¶
func StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor returns a new streaming server interceptor for panic recovery.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor for panic recovery.
Types ¶
type ConfigNobl ¶
type MockServerNobl ¶
type MockServerNobl struct {
// contains filtered or unexported fields
}
MockServerNobl is a mock of ServerNobl interface
func NewMockServerNobl ¶
func NewMockServerNobl(ctrl *gomock.Controller) *MockServerNobl
NewMockServerNobl creates a new mock instance
func (*MockServerNobl) EXPECT ¶
func (m *MockServerNobl) EXPECT() *MockServerNoblMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockServerNobl) Server ¶
func (m *MockServerNobl) Server() *grpc.Server
Server mocks base method
type MockServerNoblMockRecorder ¶
type MockServerNoblMockRecorder struct {
// contains filtered or unexported fields
}
MockServerNoblMockRecorder is the mock recorder for MockServerNobl
func (*MockServerNoblMockRecorder) Server ¶
func (mr *MockServerNoblMockRecorder) Server() *gomock.Call
Server indicates an expected call of Server
type ServerNobl ¶
type WebSocket ¶
type WebSocket struct { GinEngine *gindot.Engine `dot:""` // contains filtered or unexported fields }
WebSocket component makes it possible the full-duplex communication with low latency between a gRPC-WebSocket request and a remote standard gRPC server.
func (*WebSocket) Wrap ¶
Wrap wraps the given grpcServer to allow for handling grpc-web requests of websockets - enabling bidirectional requests.
Under the hood, Wrap takes a HTTP request from gin.Context and if it is a gRPC-WebSocket request wraps it with a compatibility layer to transform it to a standard gRPC request for the wrapped gRPC server and transforms the request to comply with the gRPC-Web protocol.
Through this mechanism, client (e.g. browser) is able to fully take advantage of WebSocket communication with remote gRPC service server, initially routed by the HTTP GET method and the URLs of resources that are registered on gRPC server
Note: this Wrap method can only be called before the underlying gin.Engine starts running, besides the caller must insure that all the grpc service servers get appropriately registered with the standard gRPC server.