Documentation
¶
Index ¶
- func NewService(opts ...component.Option) (component.Component, error)
- func RegisterClientServer(s *grpc.Server, srv ClientServer)
- type ClientClient
- type ClientServer
- type Client_StreamClient
- type Client_StreamServer
- type Message
- type Service
- func (p *Service) Call(ctx context.Context, req *message.Request) (*message.Response, error)
- func (p *Service) Publish(context.Context, *message.Payload) (*message.Payload, error)
- func (p *Service) Route(_ message.Message) (interface{}, error)
- func (p *Service) Start() error
- func (p *Service) Stop() error
- func (p *Service) Stream(Client_StreamServer) error
- type UnimplementedClientServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
NewService new api service
func RegisterClientServer ¶
func RegisterClientServer(s *grpc.Server, srv ClientServer)
Types ¶
type ClientClient ¶
type ClientClient interface { // Call allows a single request to be made Call(ctx context.Context, in *message.Request, opts ...grpc.CallOption) (*message.Response, error) // Stream is a bidirectional stream Stream(ctx context.Context, opts ...grpc.CallOption) (Client_StreamClient, error) // Publish publishes a payload and returns an empty payload Publish(ctx context.Context, in *message.Payload, opts ...grpc.CallOption) (*message.Payload, error) }
ClientClient is the client API for Client service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewClientClient ¶
func NewClientClient(cc *grpc.ClientConn) ClientClient
type ClientServer ¶
type ClientServer interface { // Call allows a single request to be made Call(context.Context, *message.Request) (*message.Response, error) // Stream is a bidirectional stream Stream(Client_StreamServer) error // Publish publishes a payload and returns an empty payload Publish(context.Context, *message.Payload) (*message.Payload, error) }
ClientServer is the server API for Client service.
type Client_StreamClient ¶
type Client_StreamServer ¶
type Service ¶
type Service struct { Address string // contains filtered or unexported fields }
Service api service
type UnimplementedClientServer ¶
type UnimplementedClientServer struct { }
UnimplementedClientServer can be embedded to have forward compatible implementations.
func (*UnimplementedClientServer) Stream ¶
func (*UnimplementedClientServer) Stream(srv Client_StreamServer) error
Click to show internal directories.
Click to hide internal directories.