Merge branch 'master' into pool

This commit is contained in:
Asim
2016-06-06 14:06:03 +01:00
26 changed files with 327 additions and 119 deletions

View File

@@ -1,24 +1,3 @@
/*
Package client provides a method to make synchronous, asynchronous and
streaming requests to services. By default json and protobuf codecs are
supported.
import "github.com/micro/go-micro/client"
c := client.NewClient()
req := c.NewRequest("go.micro.srv.greeter", "Greeter.Hello", &greeter.Request{
Name: "John",
})
rsp := &greeter.Response{}
if err := c.Call(context.Background(), req, rsp); err != nil {
return err
}
fmt.Println(rsp.Msg)
*/
package client
import (

23
client/doc.go Normal file
View File

@@ -0,0 +1,23 @@
/*
Package client is an interface for making requests.
It provides a method to make synchronous, asynchronous and streaming requests to services.
By default json and protobuf codecs are supported.
import "github.com/micro/go-micro/client"
c := client.NewClient()
req := c.NewRequest("go.micro.srv.greeter", "Greeter.Hello", &greeter.Request{
Name: "John",
})
rsp := &greeter.Response{}
if err := c.Call(context.Background(), req, rsp); err != nil {
return err
}
fmt.Println(rsp.Msg)
*/
package client

View File

@@ -123,6 +123,8 @@ func (m *MockClient) CallRemote(ctx context.Context, addr string, req client.Req
}
v.Set(reflect.ValueOf(r.Response))
return nil
}
return fmt.Errorf("rpc: can't find service %s", req.Method())