mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-06 06:06:50 +08:00
watchworkflow streaming protos
This commit is contained in:
@@ -119,6 +119,53 @@ func (m *GetWorkflowRequest) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type WatchWorkflowRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *WatchWorkflowRequest) Reset() { *m = WatchWorkflowRequest{} }
|
||||
func (m *WatchWorkflowRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*WatchWorkflowRequest) ProtoMessage() {}
|
||||
func (*WatchWorkflowRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_892c7f566756b0be, []int{2}
|
||||
}
|
||||
|
||||
func (m *WatchWorkflowRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_WatchWorkflowRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *WatchWorkflowRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_WatchWorkflowRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *WatchWorkflowRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_WatchWorkflowRequest.Merge(m, src)
|
||||
}
|
||||
func (m *WatchWorkflowRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_WatchWorkflowRequest.Size(m)
|
||||
}
|
||||
func (m *WatchWorkflowRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_WatchWorkflowRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_WatchWorkflowRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *WatchWorkflowRequest) GetNamespace() string {
|
||||
if m != nil {
|
||||
return m.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *WatchWorkflowRequest) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListWorkflowsRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
WorkflowTemplateUid string `protobuf:"bytes,2,opt,name=workflowTemplateUid,proto3" json:"workflowTemplateUid,omitempty"`
|
||||
@@ -131,7 +178,7 @@ func (m *ListWorkflowsRequest) Reset() { *m = ListWorkflowsRequest{} }
|
||||
func (m *ListWorkflowsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListWorkflowsRequest) ProtoMessage() {}
|
||||
func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_892c7f566756b0be, []int{2}
|
||||
return fileDescriptor_892c7f566756b0be, []int{3}
|
||||
}
|
||||
|
||||
func (m *ListWorkflowsRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -178,7 +225,7 @@ func (m *ListWorkflowsResponse) Reset() { *m = ListWorkflowsResponse{} }
|
||||
func (m *ListWorkflowsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ListWorkflowsResponse) ProtoMessage() {}
|
||||
func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_892c7f566756b0be, []int{3}
|
||||
return fileDescriptor_892c7f566756b0be, []int{4}
|
||||
}
|
||||
|
||||
func (m *ListWorkflowsResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -228,7 +275,7 @@ func (m *Workflow) Reset() { *m = Workflow{} }
|
||||
func (m *Workflow) String() string { return proto.CompactTextString(m) }
|
||||
func (*Workflow) ProtoMessage() {}
|
||||
func (*Workflow) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_892c7f566756b0be, []int{4}
|
||||
return fileDescriptor_892c7f566756b0be, []int{5}
|
||||
}
|
||||
|
||||
func (m *Workflow) XXX_Unmarshal(b []byte) error {
|
||||
@@ -296,7 +343,7 @@ func (m *Parameter) Reset() { *m = Parameter{} }
|
||||
func (m *Parameter) String() string { return proto.CompactTextString(m) }
|
||||
func (*Parameter) ProtoMessage() {}
|
||||
func (*Parameter) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_892c7f566756b0be, []int{5}
|
||||
return fileDescriptor_892c7f566756b0be, []int{6}
|
||||
}
|
||||
|
||||
func (m *Parameter) XXX_Unmarshal(b []byte) error {
|
||||
@@ -334,6 +381,7 @@ func (m *Parameter) GetValue() string {
|
||||
func init() {
|
||||
proto.RegisterType((*CreateWorkflowRequest)(nil), "api.CreateWorkflowRequest")
|
||||
proto.RegisterType((*GetWorkflowRequest)(nil), "api.GetWorkflowRequest")
|
||||
proto.RegisterType((*WatchWorkflowRequest)(nil), "api.WatchWorkflowRequest")
|
||||
proto.RegisterType((*ListWorkflowsRequest)(nil), "api.ListWorkflowsRequest")
|
||||
proto.RegisterType((*ListWorkflowsResponse)(nil), "api.ListWorkflowsResponse")
|
||||
proto.RegisterType((*Workflow)(nil), "api.Workflow")
|
||||
@@ -343,43 +391,45 @@ func init() {
|
||||
func init() { proto.RegisterFile("workflow.proto", fileDescriptor_892c7f566756b0be) }
|
||||
|
||||
var fileDescriptor_892c7f566756b0be = []byte{
|
||||
// 570 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdd, 0x6a, 0x13, 0x41,
|
||||
0x14, 0x66, 0x9b, 0xa6, 0x36, 0xa7, 0x34, 0x96, 0xd3, 0xa4, 0x5d, 0x97, 0x80, 0x61, 0x44, 0x48,
|
||||
0x6d, 0xc9, 0xda, 0x48, 0x6f, 0x2a, 0x82, 0x52, 0x6c, 0x6f, 0xbc, 0x90, 0xf5, 0x0f, 0x7a, 0xa3,
|
||||
0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xc6, 0x54,
|
||||
0x10, 0x71, 0x57, 0x93, 0x2e, 0x46, 0x73, 0x7e, 0x5a, 0x47, 0x4f, 0x3b, 0xc0, 0x47, 0x05, 0xa6,
|
||||
0xa5, 0xd5, 0x31, 0x4a, 0xd8, 0x9c, 0xc9, 0x10, 0xde, 0xd3, 0x9c, 0x79, 0xf9, 0xf5, 0xbc, 0xbc,
|
||||
0x56, 0x1a, 0x39, 0xb2, 0xaf, 0x67, 0x3f, 0xc4, 0x22, 0x4e, 0xf1, 0xa7, 0x03, 0x3b, 0xb3, 0xef,
|
||||
0x67, 0x36, 0x87, 0x24, 0xe7, 0x71, 0xed, 0xa2, 0x33, 0x1d, 0xf9, 0x31, 0x20, 0xa7, 0x5a, 0xc2,
|
||||
0x73, 0x72, 0xf0, 0x6f, 0x09, 0xf6, 0xdb, 0x22, 0x8f, 0x17, 0xc2, 0x83, 0x37, 0x0e, 0x6c, 0x4f,
|
||||
0x3d, 0xb6, 0xad, 0xdf, 0x9f, 0x5f, 0x43, 0x41, 0x5d, 0xdf, 0x1c, 0x2d, 0x6c, 0x8c, 0x9d, 0x65,
|
||||
0x84, 0xf9, 0xa3, 0x84, 0xf7, 0xc6, 0xe7, 0x67, 0xf8, 0x72, 0xf9, 0x5f, 0xf9, 0x43, 0x16, 0xcb,
|
||||
0xc9, 0x37, 0xd5, 0x1f, 0x65, 0xa7, 0x31, 0xfe, 0x72, 0xa0, 0x31, 0xbd, 0x3a, 0x23, 0xef, 0x7d,
|
||||
0x06, 0xc5, 0xd6, 0xc2, 0x76, 0xe7, 0x21, 0xc6, 0xe7, 0x5e, 0x01, 0x64, 0x16, 0x8b, 0x13, 0x6d,
|
||||
0xfd, 0x19, 0x3e, 0xfd, 0x0f, 0x13, 0x17, 0x6b, 0xfa, 0x0f, 0xe0, 0xc9, 0xdf, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xce, 0xbe, 0x73, 0x79, 0x4e, 0x06, 0x00, 0x00,
|
||||
// 596 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0x66, 0x9b, 0xa6, 0x34, 0x53, 0xb5, 0x54, 0xd3, 0xb4, 0x35, 0x56, 0x24, 0xa2, 0x45, 0x48,
|
||||
0x29, 0xad, 0xe2, 0x36, 0xa8, 0x97, 0xa2, 0x4a, 0xa0, 0x8a, 0x96, 0x03, 0x07, 0x64, 0x7e, 0x2a,
|
||||
0xf5, 0x02, 0xdb, 0x64, 0x5b, 0x2c, 0x12, 0xdb, 0x78, 0xd7, 0xe9, 0x21, 0xca, 0x05, 0x1e, 0x81,
|
||||
0x23, 0x2f, 0x82, 0xc4, 0x63, 0xe4, 0x15, 0x78, 0x10, 0x94, 0xb5, 0x77, 0x1b, 0x3b, 0x96, 0x48,
|
||||
0xd4, 0xdb, 0xee, 0xcc, 0xf8, 0x9b, 0xef, 0xdb, 0xf9, 0x76, 0x0d, 0x6b, 0x37, 0x41, 0xf4, 0xf5,
|
||||
0xaa, 0x1b, 0xdc, 0x34, 0xc3, 0x28, 0x90, 0x01, 0x96, 0x58, 0xe8, 0xd9, 0xb5, 0xeb, 0x20, 0xb8,
|
||||
0xee, 0x72, 0x87, 0x85, 0x9e, 0xc3, 0x7c, 0x3f, 0x90, 0x4c, 0x7a, 0x81, 0x2f, 0x92, 0x12, 0x7b,
|
||||
0x5b, 0x7f, 0xf2, 0x49, 0xf2, 0x5e, 0xd8, 0x65, 0x92, 0x27, 0x09, 0xfa, 0x19, 0x36, 0x4f, 0x22,
|
||||
0xce, 0x24, 0x3f, 0x4f, 0x0b, 0x5c, 0xfe, 0x2d, 0xe6, 0x42, 0x62, 0x0d, 0x2a, 0x3e, 0xeb, 0x71,
|
||||
0x11, 0xb2, 0x36, 0xb7, 0x48, 0x9d, 0x34, 0x2a, 0xee, 0x6d, 0x00, 0x77, 0x60, 0x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, 0xe5, 0x3e, 0xeb, 0xc6, 0x5a,
|
||||
0x40, 0xb2, 0x69, 0x8d, 0xee, 0xc3, 0x03, 0x8d, 0xfe, 0x8e, 0x47, 0x7d, 0xaf, 0xcd, 0x31, 0x82,
|
||||
0xb5, 0xac, 0x81, 0xd1, 0x56, 0x2c, 0x0a, 0x5d, 0x6d, 0x67, 0x8f, 0x99, 0x1e, 0x7e, 0x1f, 0xfd,
|
||||
0xfd, 0xb9, 0xe0, 0xd0, 0xc7, 0xe3, 0x6b, 0x23, 0x9c, 0xfe, 0xc1, 0x25, 0x97, 0xec, 0xc0, 0x19,
|
||||
0x98, 0xa9, 0x0f, 0x1d, 0x33, 0x88, 0x23, 0x63, 0x69, 0xf4, 0x60, 0x65, 0xc2, 0xd2, 0xb8, 0xad,
|
||||
0x40, 0xa7, 0x4d, 0x9e, 0xef, 0xd6, 0x52, 0xdd, 0xf6, 0xf0, 0xe9, 0x0c, 0xdd, 0x92, 0xe8, 0x10,
|
||||
0x05, 0xac, 0x66, 0x3c, 0x84, 0x0f, 0x15, 0x66, 0x91, 0x7f, 0x6d, 0xbb, 0x28, 0x95, 0x58, 0x8e,
|
||||
0xee, 0xaa, 0xde, 0x4f, 0x70, 0x16, 0xa5, 0x78, 0x0c, 0xab, 0x99, 0xab, 0x96, 0x36, 0x2d, 0xba,
|
||||
0x7e, 0x79, 0x8d, 0xf7, 0xf6, 0x09, 0xfe, 0x22, 0xb0, 0x95, 0x3d, 0x7e, 0x3d, 0x78, 0xa4, 0x05,
|
||||
0xb3, 0x31, 0x3e, 0x49, 0x11, 0x8b, 0x5d, 0x44, 0x4f, 0x95, 0x82, 0x17, 0x74, 0xef, 0xff, 0x0a,
|
||||
0xcc, 0x23, 0x27, 0x8e, 0xa6, 0xbc, 0x87, 0x23, 0x02, 0x1b, 0x13, 0xb3, 0x32, 0xf1, 0x47, 0xf9,
|
||||
0x29, 0xce, 0xc8, 0xeb, 0x07, 0x51, 0xc4, 0x86, 0xd8, 0x9a, 0x87, 0x98, 0x33, 0x88, 0xbd, 0xce,
|
||||
0xf0, 0xe2, 0x0c, 0x5f, 0xcd, 0xff, 0x95, 0xd3, 0xe7, 0x91, 0x18, 0x3f, 0xee, 0xce, 0x20, 0x5d,
|
||||
0x0d, 0xf1, 0x37, 0x81, 0xda, 0xe4, 0xe4, 0x35, 0xbd, 0x8f, 0x69, 0x29, 0x36, 0xa6, 0xcc, 0x91,
|
||||
0x2f, 0xd1, 0x3a, 0x77, 0x66, 0xa8, 0x4c, 0x5d, 0x75, 0xa2, 0xa4, 0x1f, 0xe3, 0xf3, 0x3b, 0x88,
|
||||
0xb8, 0x5c, 0x52, 0x7f, 0xa2, 0x67, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x90, 0x49, 0xff, 0xc5,
|
||||
0xd7, 0x06, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -398,6 +448,7 @@ type WorkflowServiceClient interface {
|
||||
CreateWorkflow(ctx context.Context, in *CreateWorkflowRequest, opts ...grpc.CallOption) (*Workflow, error)
|
||||
GetWorkflow(ctx context.Context, in *GetWorkflowRequest, opts ...grpc.CallOption) (*Workflow, error)
|
||||
ListWorkflows(ctx context.Context, in *ListWorkflowsRequest, opts ...grpc.CallOption) (*ListWorkflowsResponse, error)
|
||||
WatchWorkflow(ctx context.Context, in *WatchWorkflowRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowClient, error)
|
||||
CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
|
||||
GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
|
||||
ListWorkflowTemplateVersions(ctx context.Context, in *ListWorkflowTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkflowTemplateVersionsResponse, error)
|
||||
@@ -438,6 +489,38 @@ func (c *workflowServiceClient) ListWorkflows(ctx context.Context, in *ListWorkf
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *workflowServiceClient) WatchWorkflow(ctx context.Context, in *WatchWorkflowRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_WorkflowService_serviceDesc.Streams[0], "/api.WorkflowService/WatchWorkflow", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &workflowServiceWatchWorkflowClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type WorkflowService_WatchWorkflowClient interface {
|
||||
Recv() (*Workflow, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type workflowServiceWatchWorkflowClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *workflowServiceWatchWorkflowClient) Recv() (*Workflow, error) {
|
||||
m := new(Workflow)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *workflowServiceClient) CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
|
||||
out := new(WorkflowTemplate)
|
||||
err := c.cc.Invoke(ctx, "/api.WorkflowService/CreateWorkflowTemplate", in, out, opts...)
|
||||
@@ -471,6 +554,7 @@ type WorkflowServiceServer interface {
|
||||
CreateWorkflow(context.Context, *CreateWorkflowRequest) (*Workflow, error)
|
||||
GetWorkflow(context.Context, *GetWorkflowRequest) (*Workflow, error)
|
||||
ListWorkflows(context.Context, *ListWorkflowsRequest) (*ListWorkflowsResponse, error)
|
||||
WatchWorkflow(*WatchWorkflowRequest, WorkflowService_WatchWorkflowServer) error
|
||||
CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error)
|
||||
GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error)
|
||||
ListWorkflowTemplateVersions(context.Context, *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error)
|
||||
@@ -489,6 +573,9 @@ func (*UnimplementedWorkflowServiceServer) GetWorkflow(ctx context.Context, req
|
||||
func (*UnimplementedWorkflowServiceServer) ListWorkflows(ctx context.Context, req *ListWorkflowsRequest) (*ListWorkflowsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflows not implemented")
|
||||
}
|
||||
func (*UnimplementedWorkflowServiceServer) WatchWorkflow(req *WatchWorkflowRequest, srv WorkflowService_WatchWorkflowServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method WatchWorkflow not implemented")
|
||||
}
|
||||
func (*UnimplementedWorkflowServiceServer) CreateWorkflowTemplate(ctx context.Context, req *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplate not implemented")
|
||||
}
|
||||
@@ -557,6 +644,27 @@ func _WorkflowService_ListWorkflows_Handler(srv interface{}, ctx context.Context
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WorkflowService_WatchWorkflow_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(WatchWorkflowRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(WorkflowServiceServer).WatchWorkflow(m, &workflowServiceWatchWorkflowServer{stream})
|
||||
}
|
||||
|
||||
type WorkflowService_WatchWorkflowServer interface {
|
||||
Send(*Workflow) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type workflowServiceWatchWorkflowServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *workflowServiceWatchWorkflowServer) Send(m *Workflow) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _WorkflowService_CreateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateWorkflowTemplateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -640,6 +748,12 @@ var _WorkflowService_serviceDesc = grpc.ServiceDesc{
|
||||
Handler: _WorkflowService_ListWorkflowTemplateVersions_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "WatchWorkflow",
|
||||
Handler: _WorkflowService_WatchWorkflow_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "workflow.proto",
|
||||
}
|
||||
|
@@ -26,6 +26,12 @@ service WorkflowService {
|
||||
};
|
||||
}
|
||||
|
||||
rpc WatchWorkflow (WatchWorkflowRequest) returns (stream Workflow) {
|
||||
option (google.api.http) = {
|
||||
get: "/apis/v1beta1/{namespace}/workflows/{name}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc CreateWorkflowTemplate (CreateWorkflowTemplateRequest) returns (WorkflowTemplate) {
|
||||
option (google.api.http) = {
|
||||
post: "/apis/v1beta1/{namespace}/workflow_templates"
|
||||
@@ -59,6 +65,11 @@ message GetWorkflowRequest {
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message WatchWorkflowRequest {
|
||||
string namespace = 1;
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message ListWorkflowsRequest {
|
||||
string namespace = 1;
|
||||
string workflowTemplateUid = 2;
|
||||
|
@@ -321,6 +321,57 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"runtimeStreamError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"grpc_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"http_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"http_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-stream-definitions": {
|
||||
"apiWorkflow": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/definitions/apiWorkflow"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of apiWorkflow"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -133,12 +133,12 @@ func (c *Client) ListWorkflows(opts *Options) (workflows []*Workflow, err error)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Client) WatchWorkflow(name string, opts *Options) (watch watch.Interface, err error) {
|
||||
func (c *Client) WatchWorkflow(name string, opts *Options) (watcher watch.Interface, err error) {
|
||||
fieldSelector, err := fields.ParseSelector(fmt.Sprintf("metadata.name=%s", name))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
watch, err = c.Clientset.ArgoprojV1alpha1().Workflows(opts.Namespace).Watch(metav1.ListOptions{
|
||||
watcher, err = c.Clientset.ArgoprojV1alpha1().Workflows(opts.Namespace).Watch(metav1.ListOptions{
|
||||
FieldSelector: fieldSelector.String(),
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user