From 9e3f3bbc0e654e983c00856640215f6740a4f1f9 Mon Sep 17 00:00:00 2001 From: Asim Date: Thu, 3 Dec 2015 01:02:14 +0000 Subject: [PATCH] update comments --- client/client.go | 16 ++++++++++++++++ client/client_wrapper.go | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index c018bd45..a48528e9 100644 --- a/client/client.go +++ b/client/client.go @@ -2,6 +2,22 @@ The client package 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.Request{ + Name: "John", + }) + + rsp := &greeter.Response{} + + if err := c.Call(context.Background(), req, rsp); err != nil { + return err + } + + fmt.Println(rsp.Msg) */ package client diff --git a/client/client_wrapper.go b/client/client_wrapper.go index b0df7fcc..1b45fdd7 100644 --- a/client/client_wrapper.go +++ b/client/client_wrapper.go @@ -1,3 +1,5 @@ +package client + /* Wrapper is a type of middleware for the go-micro client. It allows the client to be "wrapped" so that requests and responses can be intercepted @@ -31,7 +33,6 @@ Example usage: */ -package client // Wrapper wraps a client and returns a client type Wrapper func(Client) Client