Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrIllegalHeaderWrite indicates that setting header is illegal because of // the stream's state. ErrIllegalHeaderWrite = errors.New("transport: the stream is done or WriteHeader was already called") )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Invoke ¶
func (c *Client) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error
Invoke performs a unary RPC and returns after the request is received into reply.
func (*Client) NewStream ¶
func (c *Client) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)
NewStream begins a streaming RPC.
type NatsConn ¶
type NatsConn interface {
Publish(subj string, data []byte) error
PublishRequest(subj, reply string, data []byte) error
Request(subj string, data []byte, timeout time.Duration) (*nats.Msg, error)
ChanSubscribe(subj string, ch chan *nats.Msg) (*nats.Subscription, error)
SubscribeSync(subj string) (*nats.Subscription, error)
QueueSubscribe(subj, queue string, cb nats.MsgHandler) (*nats.Subscription, error)
LastError() error
Flush() error
}
NatsConn nats connection.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the interface to gRPC over NATS
func (*Server) GetServiceInfo ¶ added in v0.1.4
func (s *Server) GetServiceInfo() map[string]grpc.ServiceInfo
func (*Server) RegisterService ¶
func (s *Server) RegisterService(sd *grpc.ServiceDesc, ss interface{})
RegisterService is used to register gRPC services
Directories
¶
| Path | Synopsis |
|---|---|
|
Package reflection implements server reflection service.
|
Package reflection implements server reflection service. |
Click to show internal directories.
Click to hide internal directories.