Add String method to all interfaces

This commit is contained in:
Asim
2015-12-19 21:56:14 +00:00
parent d7b3765c71
commit be43d827c7
17 changed files with 73 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ type Client interface {
Stream(ctx context.Context, req Request, opts ...CallOption) (Streamer, error)
StreamRemote(ctx context.Context, addr string, req Request, opts ...CallOption) (Streamer, error)
Publish(ctx context.Context, p Publication, opts ...PublishOption) error
String() string
}
type Publication interface {
@@ -122,3 +123,7 @@ func NewProtoRequest(service, method string, request interface{}, reqOpts ...Req
func NewJsonRequest(service, method string, request interface{}, reqOpts ...RequestOption) Request {
return DefaultClient.NewJsonRequest(service, method, request, reqOpts...)
}
func String() string {
return DefaultClient.String()
}