flowsrvserver.go 762 B

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