flowsrv.go 748 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: flowsrv.proto
  3. package flowsrv
  4. import (
  5. "context"
  6. "ylink/flowsrv/rpc/pb"
  7. "github.com/zeromicro/go-zero/zrpc"
  8. "google.golang.org/grpc"
  9. )
  10. type (
  11. CommandReq = pb.CommandReq
  12. CommandResp = pb.CommandResp
  13. Flowsrv interface {
  14. Connect(ctx context.Context, in *CommandReq, opts ...grpc.CallOption) (pb.Flowsrv_ConnectClient, error)
  15. }
  16. defaultFlowsrv struct {
  17. cli zrpc.Client
  18. }
  19. )
  20. func NewFlowsrv(cli zrpc.Client) Flowsrv {
  21. return &defaultFlowsrv{
  22. cli: cli,
  23. }
  24. }
  25. func (m *defaultFlowsrv) Connect(ctx context.Context, in *CommandReq, opts ...grpc.CallOption) (pb.Flowsrv_ConnectClient, error) {
  26. client := pb.NewFlowsrvClient(m.cli.Conn())
  27. return client.Connect(ctx, in, opts...)
  28. }