Documentation ¶
Index ¶
- func GetStreamingPayload(call *xbospb.StreamingCall, msg proto.Message) error
- func GetUnaryPayload(call *xbospb.UnaryCall, msg proto.Message) error
- func MakeStreamingResponse(call *xbospb.StreamingCall, msg proto.Message, err error) (*xbospb.StreamingResponse, error)
- func MakeStreamingResponseFinish(call *xbospb.StreamingCall, err error) (*xbospb.StreamingResponse, error)
- func MakeUnaryResponse(call *xbospb.UnaryCall, msg proto.Message, err error) (*xbospb.UnaryResponse, error)
- type Config
- type StreamCallback
- type StreamContext
- func (s *StreamContext) Context() context.Context
- func (s *StreamContext) Finish(call *xbospb.StreamingCall, err error)
- func (s *StreamContext) GetResponseChannel() chan *xbospb.StreamingResponse
- func (s *StreamContext) Send(msg *mortarpb.FetchResponse) error
- func (s *StreamContext) Start(call *xbospb.StreamingCall)
- type UnaryCallback
- type WaveMQServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStreamingPayload ¶
func GetStreamingPayload(call *xbospb.StreamingCall, msg proto.Message) error
func MakeStreamingResponse ¶
func MakeStreamingResponse(call *xbospb.StreamingCall, msg proto.Message, err error) (*xbospb.StreamingResponse, error)
func MakeStreamingResponseFinish ¶
func MakeStreamingResponseFinish(call *xbospb.StreamingCall, err error) (*xbospb.StreamingResponse, error)
func MakeUnaryResponse ¶
Types ¶
type StreamCallback ¶
type StreamCallback func(*xbospb.StreamingCall, *StreamContext) error
type StreamContext ¶
type StreamContext struct { C chan proto.Message grpc.ServerStream // contains filtered or unexported fields }
func NewStreamingContext ¶
func NewStreamingContext(timeout time.Duration) *StreamContext
func (*StreamContext) Context ¶
func (s *StreamContext) Context() context.Context
func (*StreamContext) Finish ¶
func (s *StreamContext) Finish(call *xbospb.StreamingCall, err error)
func (*StreamContext) GetResponseChannel ¶
func (s *StreamContext) GetResponseChannel() chan *xbospb.StreamingResponse
func (*StreamContext) Send ¶
func (s *StreamContext) Send(msg *mortarpb.FetchResponse) error
TODO: the type of this needs to match the GRPC server implementation unless we can find a way to subvert that
func (*StreamContext) Start ¶
func (s *StreamContext) Start(call *xbospb.StreamingCall)
type UnaryCallback ¶
type UnaryCallback func(*xbospb.UnaryCall) (*xbospb.UnaryResponse, error)
type WaveMQServer ¶
type WaveMQServer struct {
// contains filtered or unexported fields
}
func NewWaveMQServer ¶
func NewWaveMQServer(cfg *Config) (*WaveMQServer, error)
func (*WaveMQServer) OnStream ¶
func (wmq *WaveMQServer) OnStream(method string, cb StreamCallback)
func (*WaveMQServer) OnUnary ¶
func (wmq *WaveMQServer) OnUnary(method string, cb UnaryCallback)
func (*WaveMQServer) Serve ¶
func (wmq *WaveMQServer) Serve() error
Click to show internal directories.
Click to hide internal directories.