mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 05:36:50 +08:00
pod logging
This commit is contained in:
@@ -166,6 +166,69 @@ func (m *WatchWorkflowRequest) GetName() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetWorkflowLogsRequest 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"`
|
||||||
|
PodName string `protobuf:"bytes,3,opt,name=podName,proto3" json:"podName,omitempty"`
|
||||||
|
ContainerName string `protobuf:"bytes,4,opt,name=containerName,proto3" json:"containerName,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetWorkflowLogsRequest) Reset() { *m = GetWorkflowLogsRequest{} }
|
||||||
|
func (m *GetWorkflowLogsRequest) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*GetWorkflowLogsRequest) ProtoMessage() {}
|
||||||
|
func (*GetWorkflowLogsRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_892c7f566756b0be, []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetWorkflowLogsRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_GetWorkflowLogsRequest.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *GetWorkflowLogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_GetWorkflowLogsRequest.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (m *GetWorkflowLogsRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_GetWorkflowLogsRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *GetWorkflowLogsRequest) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_GetWorkflowLogsRequest.Size(m)
|
||||||
|
}
|
||||||
|
func (m *GetWorkflowLogsRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_GetWorkflowLogsRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_GetWorkflowLogsRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *GetWorkflowLogsRequest) GetNamespace() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Namespace
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetWorkflowLogsRequest) GetName() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Name
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetWorkflowLogsRequest) GetPodName() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.PodName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetWorkflowLogsRequest) GetContainerName() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.ContainerName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
type ListWorkflowsRequest struct {
|
type ListWorkflowsRequest struct {
|
||||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||||
WorkflowTemplateUid string `protobuf:"bytes,2,opt,name=workflowTemplateUid,proto3" json:"workflowTemplateUid,omitempty"`
|
WorkflowTemplateUid string `protobuf:"bytes,2,opt,name=workflowTemplateUid,proto3" json:"workflowTemplateUid,omitempty"`
|
||||||
@@ -178,7 +241,7 @@ func (m *ListWorkflowsRequest) Reset() { *m = ListWorkflowsRequest{} }
|
|||||||
func (m *ListWorkflowsRequest) String() string { return proto.CompactTextString(m) }
|
func (m *ListWorkflowsRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ListWorkflowsRequest) ProtoMessage() {}
|
func (*ListWorkflowsRequest) ProtoMessage() {}
|
||||||
func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) {
|
func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_892c7f566756b0be, []int{3}
|
return fileDescriptor_892c7f566756b0be, []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ListWorkflowsRequest) XXX_Unmarshal(b []byte) error {
|
func (m *ListWorkflowsRequest) XXX_Unmarshal(b []byte) error {
|
||||||
@@ -225,7 +288,7 @@ func (m *ListWorkflowsResponse) Reset() { *m = ListWorkflowsResponse{} }
|
|||||||
func (m *ListWorkflowsResponse) String() string { return proto.CompactTextString(m) }
|
func (m *ListWorkflowsResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ListWorkflowsResponse) ProtoMessage() {}
|
func (*ListWorkflowsResponse) ProtoMessage() {}
|
||||||
func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) {
|
func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_892c7f566756b0be, []int{4}
|
return fileDescriptor_892c7f566756b0be, []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ListWorkflowsResponse) XXX_Unmarshal(b []byte) error {
|
func (m *ListWorkflowsResponse) XXX_Unmarshal(b []byte) error {
|
||||||
@@ -260,6 +323,45 @@ func (m *ListWorkflowsResponse) GetWorkflows() []*Workflow {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LogEntry struct {
|
||||||
|
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LogEntry) Reset() { *m = LogEntry{} }
|
||||||
|
func (m *LogEntry) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*LogEntry) ProtoMessage() {}
|
||||||
|
func (*LogEntry) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_892c7f566756b0be, []int{6}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *LogEntry) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_LogEntry.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_LogEntry.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (m *LogEntry) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_LogEntry.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *LogEntry) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_LogEntry.Size(m)
|
||||||
|
}
|
||||||
|
func (m *LogEntry) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_LogEntry.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_LogEntry proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *LogEntry) GetContent() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Content
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
type Workflow struct {
|
type Workflow struct {
|
||||||
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
|
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid,omitempty"`
|
||||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
@@ -275,7 +377,7 @@ func (m *Workflow) Reset() { *m = Workflow{} }
|
|||||||
func (m *Workflow) String() string { return proto.CompactTextString(m) }
|
func (m *Workflow) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Workflow) ProtoMessage() {}
|
func (*Workflow) ProtoMessage() {}
|
||||||
func (*Workflow) Descriptor() ([]byte, []int) {
|
func (*Workflow) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_892c7f566756b0be, []int{5}
|
return fileDescriptor_892c7f566756b0be, []int{7}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Workflow) XXX_Unmarshal(b []byte) error {
|
func (m *Workflow) XXX_Unmarshal(b []byte) error {
|
||||||
@@ -343,7 +445,7 @@ func (m *Parameter) Reset() { *m = Parameter{} }
|
|||||||
func (m *Parameter) String() string { return proto.CompactTextString(m) }
|
func (m *Parameter) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Parameter) ProtoMessage() {}
|
func (*Parameter) ProtoMessage() {}
|
||||||
func (*Parameter) Descriptor() ([]byte, []int) {
|
func (*Parameter) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_892c7f566756b0be, []int{6}
|
return fileDescriptor_892c7f566756b0be, []int{8}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Parameter) XXX_Unmarshal(b []byte) error {
|
func (m *Parameter) XXX_Unmarshal(b []byte) error {
|
||||||
@@ -382,8 +484,10 @@ func init() {
|
|||||||
proto.RegisterType((*CreateWorkflowRequest)(nil), "api.CreateWorkflowRequest")
|
proto.RegisterType((*CreateWorkflowRequest)(nil), "api.CreateWorkflowRequest")
|
||||||
proto.RegisterType((*GetWorkflowRequest)(nil), "api.GetWorkflowRequest")
|
proto.RegisterType((*GetWorkflowRequest)(nil), "api.GetWorkflowRequest")
|
||||||
proto.RegisterType((*WatchWorkflowRequest)(nil), "api.WatchWorkflowRequest")
|
proto.RegisterType((*WatchWorkflowRequest)(nil), "api.WatchWorkflowRequest")
|
||||||
|
proto.RegisterType((*GetWorkflowLogsRequest)(nil), "api.GetWorkflowLogsRequest")
|
||||||
proto.RegisterType((*ListWorkflowsRequest)(nil), "api.ListWorkflowsRequest")
|
proto.RegisterType((*ListWorkflowsRequest)(nil), "api.ListWorkflowsRequest")
|
||||||
proto.RegisterType((*ListWorkflowsResponse)(nil), "api.ListWorkflowsResponse")
|
proto.RegisterType((*ListWorkflowsResponse)(nil), "api.ListWorkflowsResponse")
|
||||||
|
proto.RegisterType((*LogEntry)(nil), "api.LogEntry")
|
||||||
proto.RegisterType((*Workflow)(nil), "api.Workflow")
|
proto.RegisterType((*Workflow)(nil), "api.Workflow")
|
||||||
proto.RegisterType((*Parameter)(nil), "api.Parameter")
|
proto.RegisterType((*Parameter)(nil), "api.Parameter")
|
||||||
}
|
}
|
||||||
@@ -391,49 +495,55 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("workflow.proto", fileDescriptor_892c7f566756b0be) }
|
func init() { proto.RegisterFile("workflow.proto", fileDescriptor_892c7f566756b0be) }
|
||||||
|
|
||||||
var fileDescriptor_892c7f566756b0be = []byte{
|
var fileDescriptor_892c7f566756b0be = []byte{
|
||||||
// 660 bytes of a gzipped FileDescriptorProto
|
// 767 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xdf, 0x4e, 0xd4, 0x40,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0xdf, 0x4f, 0x13, 0x4b,
|
||||||
0x14, 0xc6, 0x33, 0x2c, 0x4b, 0xd8, 0x43, 0x40, 0x72, 0x58, 0x60, 0x6d, 0x30, 0xe2, 0x18, 0x13,
|
0x14, 0xc7, 0x33, 0x94, 0x72, 0xe9, 0x21, 0x05, 0x72, 0x28, 0xd0, 0xdb, 0xcb, 0xcd, 0xe5, 0x8e,
|
||||||
0x10, 0xd2, 0xc2, 0x2a, 0x89, 0xc1, 0x98, 0x68, 0x88, 0xe0, 0x05, 0x17, 0xa6, 0xfe, 0x21, 0xe1,
|
0x98, 0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d0, 0xd2, 0x99, 0xaa, 0xfe, 0xa6, 0x0f, 0x20, 0x77, 0xc8, 0x54, 0xed, 0xc5, 0xd5, 0x95,
|
||||||
0xa2, 0x9c, 0xd2, 0x06, 0xcc, 0x69, 0x4f, 0xaf, 0xd3, 0x33, 0x7c, 0xe3, 0x9d, 0xa4, 0xc2, 0x45,
|
0xde, 0x13, 0x58, 0xe8, 0x43, 0xaa, 0x88, 0x86, 0xfc, 0x63, 0x31, 0xcc, 0xc3, 0x5f, 0xae, 0xa8,
|
||||||
0x5b, 0xf4, 0x10, 0xe6, 0x73, 0x7d, 0x44, 0x18, 0xf8, 0x82, 0x63, 0x1d, 0xaa, 0xad, 0x20, 0xf6,
|
0x3f, 0xf4, 0xb7, 0x53, 0x7a, 0xdb, 0x2c, 0x71, 0x05, 0xb2, 0x35, 0xe1, 0x28, 0x66, 0x3b, 0xdc,
|
||||||
0xa5, 0x6a, 0x52, 0x75, 0x93, 0x09, 0xae, 0x41, 0x4d, 0xab, 0x88, 0xc6, 0xd8, 0x72, 0x65, 0xf0,
|
0xd3, 0xf6, 0x71, 0x6d, 0x8f, 0x6e, 0xd2, 0x53, 0xc8, 0x55, 0x6c, 0x19, 0xc2, 0x0c, 0x49, 0x52,
|
||||||
0x50, 0xaf, 0xf7, 0xe9, 0x0f, 0x02, 0x93, 0x7a, 0x1d, 0x67, 0xa1, 0x12, 0x7b, 0x27, 0x29, 0x72,
|
0x82, 0x39, 0x53, 0xe0, 0x27, 0xc1, 0x85, 0x3e, 0xb5, 0xeb, 0x01, 0x58, 0x92, 0x89, 0x1e, 0xc1,
|
||||||
0x6f, 0x58, 0x64, 0x1b, 0x17, 0x60, 0x42, 0x48, 0x26, 0x63, 0xd1, 0xa8, 0xa8, 0xd5, 0x74, 0x86,
|
0x7c, 0x2c, 0x8e, 0x74, 0x85, 0x23, 0x39, 0xe6, 0x20, 0x5d, 0x13, 0x2d, 0x47, 0xe9, 0x20, 0xe9,
|
||||||
0x36, 0x40, 0xc8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c0, 0x04, 0xb1, 0xcd, 0xb4, 0xd0, 0x3d, 0x1d, 0xfb, 0x2e, 0xee, 0x8c, 0x10, 0xdb,
|
||||||
0xf9, 0xf0, 0x5f, 0x19, 0x77, 0xce, 0x65, 0x3a, 0xea, 0xe2, 0x77, 0x02, 0x4b, 0xfd, 0xb1, 0xcf,
|
0x15, 0x75, 0x69, 0x75, 0x82, 0x57, 0xa6, 0x6b, 0x35, 0x45, 0xa3, 0x44, 0xf0, 0x13, 0x81, 0x85,
|
||||||
0x5d, 0x8c, 0xc0, 0x95, 0x81, 0x97, 0x91, 0x2f, 0xd1, 0x3e, 0x57, 0x4b, 0x54, 0xa6, 0x4f, 0x6a,
|
0x68, 0xff, 0x98, 0xce, 0x45, 0x9a, 0xd0, 0x5c, 0x61, 0xa3, 0x07, 0x58, 0xc9, 0x63, 0x40, 0xf7,
|
||||||
0x47, 0x59, 0x7f, 0x82, 0x8f, 0x47, 0x30, 0x81, 0x5f, 0x49, 0xf6, 0x9f, 0x84, 0xee, 0x26, 0xf0,
|
0x35, 0xde, 0x3d, 0xba, 0xf1, 0x7b, 0xbc, 0xf0, 0x87, 0x45, 0x6e, 0x0f, 0x0c, 0x0f, 0x7e, 0x25,
|
||||||
0xce, 0x5f, 0x49, 0x0c, 0x2c, 0xfd, 0x57, 0x49, 0x4a, 0xf9, 0x50, 0x51, 0xda, 0x38, 0x54, 0xfc,
|
0xf0, 0x6f, 0x32, 0xc0, 0x33, 0xee, 0x49, 0x5b, 0x38, 0x57, 0x81, 0x3c, 0xd5, 0x90, 0xc7, 0xb4,
|
||||||
0x8f, 0x27, 0xd4, 0xaf, 0x83, 0x07, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x32, 0xe7, 0x89, 0x2c,
|
0x32, 0x0a, 0xa4, 0xd5, 0x89, 0x43, 0x16, 0x5b, 0x76, 0xbd, 0x6b, 0xb5, 0x7b, 0x3c, 0x49, 0x49,
|
||||||
0x6b, 0x08, 0x00, 0x00,
|
0x5c, 0x10, 0x98, 0xeb, 0xbb, 0xd5, 0x70, 0xff, 0xbf, 0xf8, 0x7d, 0x0f, 0xc9, 0xfd, 0x96, 0x68,
|
||||||
|
0xf0, 0x2e, 0x96, 0x47, 0x03, 0xf7, 0x39, 0x8f, 0x0e, 0x70, 0x6f, 0xf4, 0x53, 0x61, 0x76, 0x56,
|
||||||
|
0x27, 0xf8, 0xea, 0xe2, 0x67, 0x02, 0x4b, 0xfd, 0xf3, 0x17, 0xbb, 0x18, 0x89, 0xab, 0x03, 0x23,
|
||||||
|
0x1a, 0x77, 0x31, 0x79, 0xae, 0x0d, 0xe1, 0x19, 0xcc, 0xf6, 0xae, 0x4e, 0x7d, 0x07, 0xef, 0x5c,
|
||||||
|
0x21, 0x09, 0xfc, 0x48, 0xa2, 0xbf, 0x69, 0x26, 0x9a, 0xc4, 0xff, 0x7f, 0x4a, 0x12, 0xc2, 0xd2,
|
||||||
|
0x5f, 0xb9, 0x04, 0x94, 0xb7, 0x34, 0x65, 0x11, 0x47, 0x6a, 0xff, 0x93, 0x09, 0xfd, 0xcf, 0xea,
|
||||||
|
0xe6, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x25, 0x28, 0x97, 0xa7, 0x09, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@@ -453,6 +563,7 @@ type WorkflowServiceClient interface {
|
|||||||
GetWorkflow(ctx context.Context, in *GetWorkflowRequest, 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)
|
ListWorkflows(ctx context.Context, in *ListWorkflowsRequest, opts ...grpc.CallOption) (*ListWorkflowsResponse, error)
|
||||||
WatchWorkflow(ctx context.Context, in *WatchWorkflowRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowClient, error)
|
WatchWorkflow(ctx context.Context, in *WatchWorkflowRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowClient, error)
|
||||||
|
GetWorkflowLogs(ctx context.Context, in *GetWorkflowLogsRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowLogsClient, error)
|
||||||
CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
|
CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
|
||||||
CreateWorkflowTemplateVersion(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
|
CreateWorkflowTemplateVersion(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
|
||||||
GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
|
GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
|
||||||
@@ -527,6 +638,38 @@ func (x *workflowServiceWatchWorkflowClient) Recv() (*Workflow, error) {
|
|||||||
return m, nil
|
return m, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *workflowServiceClient) GetWorkflowLogs(ctx context.Context, in *GetWorkflowLogsRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowLogsClient, error) {
|
||||||
|
stream, err := c.cc.NewStream(ctx, &_WorkflowService_serviceDesc.Streams[1], "/api.WorkflowService/GetWorkflowLogs", opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &workflowServiceGetWorkflowLogsClient{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_GetWorkflowLogsClient interface {
|
||||||
|
Recv() (*LogEntry, error)
|
||||||
|
grpc.ClientStream
|
||||||
|
}
|
||||||
|
|
||||||
|
type workflowServiceGetWorkflowLogsClient struct {
|
||||||
|
grpc.ClientStream
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *workflowServiceGetWorkflowLogsClient) Recv() (*LogEntry, error) {
|
||||||
|
m := new(LogEntry)
|
||||||
|
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) {
|
func (c *workflowServiceClient) CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
|
||||||
out := new(WorkflowTemplate)
|
out := new(WorkflowTemplate)
|
||||||
err := c.cc.Invoke(ctx, "/api.WorkflowService/CreateWorkflowTemplate", in, out, opts...)
|
err := c.cc.Invoke(ctx, "/api.WorkflowService/CreateWorkflowTemplate", in, out, opts...)
|
||||||
@@ -579,6 +722,7 @@ type WorkflowServiceServer interface {
|
|||||||
GetWorkflow(context.Context, *GetWorkflowRequest) (*Workflow, error)
|
GetWorkflow(context.Context, *GetWorkflowRequest) (*Workflow, error)
|
||||||
ListWorkflows(context.Context, *ListWorkflowsRequest) (*ListWorkflowsResponse, error)
|
ListWorkflows(context.Context, *ListWorkflowsRequest) (*ListWorkflowsResponse, error)
|
||||||
WatchWorkflow(*WatchWorkflowRequest, WorkflowService_WatchWorkflowServer) error
|
WatchWorkflow(*WatchWorkflowRequest, WorkflowService_WatchWorkflowServer) error
|
||||||
|
GetWorkflowLogs(*GetWorkflowLogsRequest, WorkflowService_GetWorkflowLogsServer) error
|
||||||
CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error)
|
CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error)
|
||||||
CreateWorkflowTemplateVersion(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error)
|
CreateWorkflowTemplateVersion(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error)
|
||||||
GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error)
|
GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error)
|
||||||
@@ -602,6 +746,9 @@ func (*UnimplementedWorkflowServiceServer) ListWorkflows(ctx context.Context, re
|
|||||||
func (*UnimplementedWorkflowServiceServer) WatchWorkflow(req *WatchWorkflowRequest, srv WorkflowService_WatchWorkflowServer) error {
|
func (*UnimplementedWorkflowServiceServer) WatchWorkflow(req *WatchWorkflowRequest, srv WorkflowService_WatchWorkflowServer) error {
|
||||||
return status.Errorf(codes.Unimplemented, "method WatchWorkflow not implemented")
|
return status.Errorf(codes.Unimplemented, "method WatchWorkflow not implemented")
|
||||||
}
|
}
|
||||||
|
func (*UnimplementedWorkflowServiceServer) GetWorkflowLogs(req *GetWorkflowLogsRequest, srv WorkflowService_GetWorkflowLogsServer) error {
|
||||||
|
return status.Errorf(codes.Unimplemented, "method GetWorkflowLogs not implemented")
|
||||||
|
}
|
||||||
func (*UnimplementedWorkflowServiceServer) CreateWorkflowTemplate(ctx context.Context, req *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) {
|
func (*UnimplementedWorkflowServiceServer) CreateWorkflowTemplate(ctx context.Context, req *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplate not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplate not implemented")
|
||||||
}
|
}
|
||||||
@@ -697,6 +844,27 @@ func (x *workflowServiceWatchWorkflowServer) Send(m *Workflow) error {
|
|||||||
return x.ServerStream.SendMsg(m)
|
return x.ServerStream.SendMsg(m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _WorkflowService_GetWorkflowLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(GetWorkflowLogsRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(WorkflowServiceServer).GetWorkflowLogs(m, &workflowServiceGetWorkflowLogsServer{stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
type WorkflowService_GetWorkflowLogsServer interface {
|
||||||
|
Send(*LogEntry) error
|
||||||
|
grpc.ServerStream
|
||||||
|
}
|
||||||
|
|
||||||
|
type workflowServiceGetWorkflowLogsServer struct {
|
||||||
|
grpc.ServerStream
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *workflowServiceGetWorkflowLogsServer) Send(m *LogEntry) error {
|
||||||
|
return x.ServerStream.SendMsg(m)
|
||||||
|
}
|
||||||
|
|
||||||
func _WorkflowService_CreateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _WorkflowService_CreateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(CreateWorkflowTemplateRequest)
|
in := new(CreateWorkflowTemplateRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@@ -830,6 +998,11 @@ var _WorkflowService_serviceDesc = grpc.ServiceDesc{
|
|||||||
Handler: _WorkflowService_WatchWorkflow_Handler,
|
Handler: _WorkflowService_WatchWorkflow_Handler,
|
||||||
ServerStreams: true,
|
ServerStreams: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
StreamName: "GetWorkflowLogs",
|
||||||
|
Handler: _WorkflowService_GetWorkflowLogs_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Metadata: "workflow.proto",
|
Metadata: "workflow.proto",
|
||||||
}
|
}
|
||||||
|
@@ -292,6 +292,74 @@ func request_WorkflowService_WatchWorkflow_0(ctx context.Context, marshaler runt
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
filter_WorkflowService_GetWorkflowLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "name": 1, "podName": 2}, Base: []int{1, 1, 2, 3, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 3, 4}}
|
||||||
|
)
|
||||||
|
|
||||||
|
func request_WorkflowService_GetWorkflowLogs_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (WorkflowService_GetWorkflowLogsClient, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq GetWorkflowLogsRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["namespace"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Namespace, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
val, ok = pathParams["name"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Name, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
val, ok = pathParams["podName"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "podName")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.PodName, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "podName", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkflowService_GetWorkflowLogs_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
stream, err := client.GetWorkflowLogs(ctx, &protoReq)
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, err
|
||||||
|
}
|
||||||
|
header, err := stream.Header()
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, err
|
||||||
|
}
|
||||||
|
metadata.HeaderMD = header
|
||||||
|
return stream, metadata, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func request_WorkflowService_CreateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func request_WorkflowService_CreateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq CreateWorkflowTemplateRequest
|
var protoReq CreateWorkflowTemplateRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
@@ -845,6 +913,13 @@ func RegisterWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
|||||||
return
|
return
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_WorkflowService_GetWorkflowLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
|
||||||
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
})
|
||||||
|
|
||||||
mux.Handle("POST", pattern_WorkflowService_CreateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_WorkflowService_CreateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
@@ -1086,6 +1161,26 @@ func RegisterWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_WorkflowService_GetWorkflowLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_WorkflowService_GetWorkflowLogs_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_WorkflowService_GetWorkflowLogs_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
mux.Handle("POST", pattern_WorkflowService_CreateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("POST", pattern_WorkflowService_CreateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
@@ -1218,6 +1313,8 @@ var (
|
|||||||
|
|
||||||
pattern_WorkflowService_WatchWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflows", "name", "watch"}, "", runtime.AssumeColonVerbOpt(true)))
|
pattern_WorkflowService_WatchWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflows", "name", "watch"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
|
pattern_WorkflowService_GetWorkflowLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"apis", "v1beta1", "namespace", "workflows", "name", "pods", "podName", "log"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
pattern_WorkflowService_CreateWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_templates"}, "", runtime.AssumeColonVerbOpt(true)))
|
pattern_WorkflowService_CreateWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_templates"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
|
|
||||||
pattern_WorkflowService_CreateWorkflowTemplateVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "workflowTemplate.uid", "versions"}, "", runtime.AssumeColonVerbOpt(true)))
|
pattern_WorkflowService_CreateWorkflowTemplateVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workflow_templates", "workflowTemplate.uid", "versions"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||||
@@ -1240,6 +1337,8 @@ var (
|
|||||||
|
|
||||||
forward_WorkflowService_WatchWorkflow_0 = runtime.ForwardResponseStream
|
forward_WorkflowService_WatchWorkflow_0 = runtime.ForwardResponseStream
|
||||||
|
|
||||||
|
forward_WorkflowService_GetWorkflowLogs_0 = runtime.ForwardResponseStream
|
||||||
|
|
||||||
forward_WorkflowService_CreateWorkflowTemplate_0 = runtime.ForwardResponseMessage
|
forward_WorkflowService_CreateWorkflowTemplate_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_WorkflowService_CreateWorkflowTemplateVersion_0 = runtime.ForwardResponseMessage
|
forward_WorkflowService_CreateWorkflowTemplateVersion_0 = runtime.ForwardResponseMessage
|
||||||
|
@@ -32,6 +32,12 @@ service WorkflowService {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rpc GetWorkflowLogs (GetWorkflowLogsRequest) returns (stream LogEntry) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/apis/v1beta1/{namespace}/workflows/{name}/pods/{podName}/log"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
rpc CreateWorkflowTemplate (CreateWorkflowTemplateRequest) returns (WorkflowTemplate) {
|
rpc CreateWorkflowTemplate (CreateWorkflowTemplateRequest) returns (WorkflowTemplate) {
|
||||||
option (google.api.http) = {
|
option (google.api.http) = {
|
||||||
post: "/apis/v1beta1/{namespace}/workflow_templates"
|
post: "/apis/v1beta1/{namespace}/workflow_templates"
|
||||||
@@ -83,6 +89,13 @@ message WatchWorkflowRequest {
|
|||||||
string name = 2;
|
string name = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GetWorkflowLogsRequest {
|
||||||
|
string namespace = 1;
|
||||||
|
string name = 2;
|
||||||
|
string podName = 3;
|
||||||
|
string containerName = 4;
|
||||||
|
}
|
||||||
|
|
||||||
message ListWorkflowsRequest {
|
message ListWorkflowsRequest {
|
||||||
string namespace = 1;
|
string namespace = 1;
|
||||||
string workflowTemplateUid = 2;
|
string workflowTemplateUid = 2;
|
||||||
@@ -93,6 +106,10 @@ message ListWorkflowsResponse {
|
|||||||
repeated Workflow workflows = 2;
|
repeated Workflow workflows = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message LogEntry {
|
||||||
|
string content = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message Workflow {
|
message Workflow {
|
||||||
string uid = 1;
|
string uid = 1;
|
||||||
string name = 2;
|
string name = 2;
|
||||||
|
@@ -298,6 +298,48 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/apis/v1beta1/{namespace}/workflows/{name}/pods/{podName}/log": {
|
||||||
|
"get": {
|
||||||
|
"operationId": "GetWorkflowLogs",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "A successful response.(streaming responses)",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/x-stream-definitions/apiLogEntry"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "namespace",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "name",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "podName",
|
||||||
|
"in": "path",
|
||||||
|
"required": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "containerName",
|
||||||
|
"in": "query",
|
||||||
|
"required": false,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"WorkflowService"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/apis/v1beta1/{namespace}/workflows/{name}/watch": {
|
"/apis/v1beta1/{namespace}/workflows/{name}/watch": {
|
||||||
"get": {
|
"get": {
|
||||||
"operationId": "WatchWorkflow",
|
"operationId": "WatchWorkflow",
|
||||||
@@ -375,6 +417,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"apiLogEntry": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"content": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"apiParameter": {
|
"apiParameter": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -466,6 +516,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"x-stream-definitions": {
|
"x-stream-definitions": {
|
||||||
|
"apiLogEntry": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"result": {
|
||||||
|
"$ref": "#/definitions/apiLogEntry"
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"$ref": "#/definitions/runtimeStreamError"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "Stream result of apiLogEntry"
|
||||||
|
},
|
||||||
"apiWorkflow": {
|
"apiWorkflow": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
15
kube/pod.go
Normal file
15
kube/pod.go
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package kube
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
|
||||||
|
v1 "k8s.io/api/core/v1"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *Client) GetPodLogs(namespace, podName, containerName string) (io.ReadCloser, error) {
|
||||||
|
return c.CoreV1().Pods(namespace).GetLogs(podName, &v1.PodLogOptions{
|
||||||
|
Container: containerName,
|
||||||
|
Follow: true,
|
||||||
|
Timestamps: true,
|
||||||
|
}).Stream()
|
||||||
|
}
|
@@ -1,6 +1,7 @@
|
|||||||
package manager
|
package manager
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
@@ -134,6 +135,23 @@ func (r *ResourceManager) WatchWorkflow(namespace, name string) (<-chan *model.W
|
|||||||
return workflowWatcher, nil
|
return workflowWatcher, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *ResourceManager) GetWorkflowLogs(namespace, name, podName, containerName string) (<-chan *model.LogEntry, error) {
|
||||||
|
stream, err := r.kubeClient.GetPodLogs(namespace, podName, containerName)
|
||||||
|
|
||||||
|
logWatcher := make(chan *model.LogEntry)
|
||||||
|
if err != nil {
|
||||||
|
go func() {
|
||||||
|
scanner := bufio.NewScanner(stream)
|
||||||
|
for scanner.Scan() {
|
||||||
|
logWatcher <- &model.LogEntry{Content: scanner.Text()}
|
||||||
|
}
|
||||||
|
close(logWatcher)
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
|
return logWatcher, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (r *ResourceManager) ListWorkflows(namespace, workflowTemplateUID string) (workflows []*model.Workflow, err error) {
|
func (r *ResourceManager) ListWorkflows(namespace, workflowTemplateUID string) (workflows []*model.Workflow, err error) {
|
||||||
opts := &kube.WorkflowOptions{}
|
opts := &kube.WorkflowOptions{}
|
||||||
if workflowTemplateUID != "" {
|
if workflowTemplateUID != "" {
|
||||||
|
5
model/log_entry.go
Normal file
5
model/log_entry.go
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package model
|
||||||
|
|
||||||
|
type LogEntry struct {
|
||||||
|
Content string
|
||||||
|
}
|
@@ -103,6 +103,31 @@ func (s *WorkflowServer) WatchWorkflow(req *api.WatchWorkflowRequest, stream api
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *WorkflowServer) GetWorkflowLogs(req *api.GetWorkflowLogsRequest, stream api.WorkflowService_GetWorkflowLogsServer) error {
|
||||||
|
watcher, err := s.resourceManager.GetWorkflowLogs(req.Namespace, req.Name, req.PodName, req.ContainerName)
|
||||||
|
if errors.As(err, &userError) {
|
||||||
|
return userError.GRPCError()
|
||||||
|
}
|
||||||
|
|
||||||
|
le := &model.LogEntry{}
|
||||||
|
ticker := time.NewTicker(time.Second)
|
||||||
|
for {
|
||||||
|
select {
|
||||||
|
case le = <-watcher:
|
||||||
|
case <-ticker.C:
|
||||||
|
}
|
||||||
|
|
||||||
|
if le == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if err := stream.Send(&api.LogEntry{Content: le.Content}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *WorkflowServer) ListWorkflows(ctx context.Context, req *api.ListWorkflowsRequest) (*api.ListWorkflowsResponse, error) {
|
func (s *WorkflowServer) ListWorkflows(ctx context.Context, req *api.ListWorkflowsRequest) (*api.ListWorkflowsResponse, error) {
|
||||||
workflows, err := s.resourceManager.ListWorkflows(req.Namespace, req.WorkflowTemplateUid)
|
workflows, err := s.resourceManager.ListWorkflows(req.Namespace, req.WorkflowTemplateUid)
|
||||||
if errors.As(err, &userError) {
|
if errors.As(err, &userError) {
|
||||||
|
Reference in New Issue
Block a user