mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 13:46:51 +08:00
feat: updated grpc gateway related code
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/router"
|
||||
"github.com/onepanelio/core/server/converter"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"sort"
|
||||
@@ -24,7 +25,9 @@ import (
|
||||
requestSort "github.com/onepanelio/core/pkg/util/request/sort"
|
||||
)
|
||||
|
||||
type WorkflowServer struct{}
|
||||
type WorkflowServer struct {
|
||||
api.UnimplementedWorkflowServiceServer
|
||||
}
|
||||
|
||||
func NewWorkflowServer() *WorkflowServer {
|
||||
return &WorkflowServer{}
|
||||
@@ -217,6 +220,7 @@ func (s *WorkflowServer) WatchWorkflowExecution(req *api.WatchWorkflowExecutionR
|
||||
}
|
||||
wf.Namespace = req.Namespace
|
||||
if err := stream.Send(apiWorkflowExecution(wf, webRouter)); err != nil {
|
||||
log.Printf("Stream Send failed: %v\n", err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user