GrayRule.liverpc.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
  2. // source: v1/GrayRule.proto
  3. package v1
  4. import context "context"
  5. import proto "github.com/golang/protobuf/proto"
  6. import "go-common/library/net/rpc/liverpc"
  7. var _ proto.Message // generate to suppress unused imports
  8. // ==================
  9. // GrayRule Interface
  10. // ==================
  11. type GrayRuleRPCClient interface {
  12. // * 获取灰度策略配置
  13. //
  14. GetByMark(ctx context.Context, req *GrayRuleGetByMarkReq, opts ...liverpc.CallOption) (resp *GrayRuleGetByMarkResp, err error)
  15. }
  16. // ========================
  17. // GrayRule Live Rpc Client
  18. // ========================
  19. type grayRuleRPCClient struct {
  20. client *liverpc.Client
  21. }
  22. // NewGrayRuleRPCClient creates a client that implements the GrayRuleRPCClient interface.
  23. func NewGrayRuleRPCClient(client *liverpc.Client) GrayRuleRPCClient {
  24. return &grayRuleRPCClient{
  25. client: client,
  26. }
  27. }
  28. func (c *grayRuleRPCClient) GetByMark(ctx context.Context, in *GrayRuleGetByMarkReq, opts ...liverpc.CallOption) (*GrayRuleGetByMarkResp, error) {
  29. out := new(GrayRuleGetByMarkResp)
  30. err := doRPCRequest(ctx, c.client, 1, "GrayRule.getByMark", in, out, opts)
  31. if err != nil {
  32. return nil, err
  33. }
  34. return out, nil
  35. }