flowsrvserver.go 818 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: flowsrv.proto
  3. package server
  4. import (
  5. "context"
  6. "ylink/comm/kafka"
  7. "ylink/flowsrv/rpc/internal/logic"
  8. "ylink/flowsrv/rpc/internal/svc"
  9. "ylink/flowsrv/rpc/pb"
  10. )
  11. type FlowsrvServer struct {
  12. svcCtx *svc.ServiceContext
  13. pb.UnimplementedFlowsrvServer
  14. ConsumerGroup *kafka.ConsumerGroup
  15. }
  16. func NewFlowsrvServer(svcCtx *svc.ServiceContext) *FlowsrvServer {
  17. return &FlowsrvServer{
  18. svcCtx: svcCtx,
  19. }
  20. }
  21. func (s *FlowsrvServer) Connect(in *pb.CommandReq, stream pb.Flowsrv_ConnectServer) error {
  22. l := logic.NewConnectLogic(stream.Context(), s.svcCtx)
  23. return l.Connect(in, stream)
  24. }
  25. func (s *FlowsrvServer) Disconnect(ctx context.Context, in *pb.CommandReq) (*pb.CommandResp, error) {
  26. l := logic.NewDisconnectLogic(ctx, s.svcCtx)
  27. return l.Disconnect(in)
  28. }