|
|
@ -14,15 +14,15 @@ It has these top-level messages: |
|
|
|
*/ |
|
|
|
package couponrpc |
|
|
|
|
|
|
|
import "github.com/chai2010/protorpc/proto" |
|
|
|
import "math" |
|
|
|
import proto "github.com/chai2010/protorpc/proto" |
|
|
|
import math "math" |
|
|
|
|
|
|
|
import "io" |
|
|
|
import "log" |
|
|
|
import "net" |
|
|
|
import "net/rpc" |
|
|
|
import "time" |
|
|
|
import "github.com/chai2010/protorpc" |
|
|
|
import protorpc "github.com/chai2010/protorpc" |
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal |
|
|
@ -100,6 +100,7 @@ func init() { |
|
|
|
type CouponService interface { |
|
|
|
IsAvailable(in *CouponRequest, out *CouponResponse) error |
|
|
|
Use(in *CouponRequest, out *CouponResponse) error |
|
|
|
GetCouponInfo(in *CouponRequest, out *CouponResponse) error |
|
|
|
} |
|
|
|
|
|
|
|
// AcceptCouponServiceClient accepts connections on the listener and serves requests
|
|
|
@ -177,6 +178,9 @@ func (c *CouponServiceClient) IsAvailable(in *CouponRequest, out *CouponResponse |
|
|
|
func (c *CouponServiceClient) Use(in *CouponRequest, out *CouponResponse) error { |
|
|
|
return c.Call("CouponService.Use", in, out) |
|
|
|
} |
|
|
|
func (c *CouponServiceClient) GetCouponInfo(in *CouponRequest, out *CouponResponse) error { |
|
|
|
return c.Call("CouponService.GetCouponInfo", in, out) |
|
|
|
} |
|
|
|
|
|
|
|
// DialCouponService connects to an CouponService at the specified network address.
|
|
|
|
func DialCouponService(network, addr string) (*CouponServiceClient, *rpc.Client, error) { |
|
|
|