Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallRemote ¶
Types ¶
type Client ¶
type Client interface {
NewPublication(topic string, msg interface{}) Publication
NewRequest(service, method string, req interface{}) Request
NewProtoRequest(service, method string, req interface{}) Request
NewJsonRequest(service, method string, req interface{}) Request
Call(ctx context.Context, req Request, rsp interface{}) error
CallRemote(ctx context.Context, addr string, req Request, rsp interface{}) error
Stream(ctx context.Context, req Request, rspChan interface{}) (Streamer, error)
StreamRemote(ctx context.Context, addr string, req Request, rspChan interface{}) (Streamer, error)
Publish(ctx context.Context, p Publication) error
}
var (
DefaultClient Client = newRpcClient()
)
type Publication ¶
func NewPublication ¶
func NewPublication(topic string, message interface{}) Publication
type Request ¶
type Request interface {
Service() string
Method() string
ContentType() string
Request() interface{}
}
func NewJsonRequest ¶
func NewProtoRequest ¶
func NewRequest ¶
Click to show internal directories.
Click to hide internal directories.