Documentation ¶
Index ¶
- Variables
- func RegisterAlineRPCServer(s grpc.ServiceRegistrar, srv AlineRPCServer)
- type AlineMessage
- func (*AlineMessage) Descriptor() ([]byte, []int)deprecated
- func (x *AlineMessage) GetAddress() string
- func (x *AlineMessage) GetError() string
- func (x *AlineMessage) GetExecReq() *ExecuteReq
- func (x *AlineMessage) GetFile() *File
- func (x *AlineMessage) GetLog() string
- func (x *AlineMessage) GetName() string
- func (x *AlineMessage) GetResult() *ExecuteResult
- func (x *AlineMessage) GetStatus() JobStatus
- func (x *AlineMessage) GetType() MessageType
- func (*AlineMessage) ProtoMessage()
- func (x *AlineMessage) ProtoReflect() protoreflect.Message
- func (x *AlineMessage) Reset()
- func (x *AlineMessage) String() string
- type AlineRPCClient
- type AlineRPCServer
- type AlineRPC_AlineChatClient
- type AlineRPC_AlineChatServer
- type ExecuteReq
- func (*ExecuteReq) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteReq) GetJobDetailId() int64
- func (x *ExecuteReq) GetName() string
- func (x *ExecuteReq) GetPipelineFile() string
- func (*ExecuteReq) ProtoMessage()
- func (x *ExecuteReq) ProtoReflect() protoreflect.Message
- func (x *ExecuteReq) Reset()
- func (x *ExecuteReq) String() string
- type ExecuteResult
- func (*ExecuteResult) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteResult) GetError() string
- func (x *ExecuteResult) GetJobID() int64
- func (x *ExecuteResult) GetJobName() string
- func (x *ExecuteResult) GetJobStatus() int64
- func (*ExecuteResult) ProtoMessage()
- func (x *ExecuteResult) ProtoReflect() protoreflect.Message
- func (x *ExecuteResult) Reset()
- func (x *ExecuteResult) String() string
- type File
- type JobStatus
- type MessageType
- func (MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x MessageType) Enum() *MessageType
- func (MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MessageType) Number() protoreflect.EnumNumber
- func (x MessageType) String() string
- func (MessageType) Type() protoreflect.EnumType
- type UnimplementedAlineRPCServer
- type UnsafeAlineRPCServer
Constants ¶
This section is empty.
Variables ¶
var ( MessageType_name = map[int32]string{ 0: "REGISTER", 1: "UNREGISTER", 2: "HEARTBEAT", 3: "EXECUTE", 4: "CANCEL", 5: "RESULT", 6: "LOG", 7: "ERROR", 8: "FILE", 9: "STATUS", } MessageType_value = map[string]int32{ "REGISTER": 0, "UNREGISTER": 1, "HEARTBEAT": 2, "EXECUTE": 3, "CANCEL": 4, "RESULT": 5, "LOG": 6, "ERROR": 7, "FILE": 8, "STATUS": 9, } )
Enum value maps for MessageType.
var ( JobStatus_name = map[int32]string{ 0: "NOTRUN", 1: "RUNNING", 2: "FAIL", 3: "SUCCESS", 4: "STOP", } JobStatus_value = map[string]int32{ "NOTRUN": 0, "RUNNING": 1, "FAIL": 2, "SUCCESS": 3, "STOP": 4, } )
Enum value maps for JobStatus.
var AlineRPC_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.AlineRPC", HandlerType: (*AlineRPCServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "AlineChat", Handler: _AlineRPC_AlineChat_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "grpc/api/aline.proto", }
AlineRPC_ServiceDesc is the grpc.ServiceDesc for AlineRPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_grpc_api_aline_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAlineRPCServer ¶
func RegisterAlineRPCServer(s grpc.ServiceRegistrar, srv AlineRPCServer)
Types ¶
type AlineMessage ¶
type AlineMessage struct { // 0: register 客户端发的注册 // 1: offline 客户端发的注销 // 2: heartbeat 客户端发的心跳 // 3: execute 服务端发的执行命令 // 4: cancel 服务端发的取消执行命令 // 5: executeResultNotify 客户端发的执行结果通知 // 6: log 客户端发的日志 // 7: 错误 // 8: 文件 Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=api.MessageType" json:"type,omitempty"` // registry Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` ExecReq *ExecuteReq `protobuf:"bytes,4,opt,name=execReq,proto3" json:"execReq,omitempty"` // execute result Result *ExecuteResult `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` // log Log string `protobuf:"bytes,6,opt,name=log,proto3" json:"log,omitempty"` Error string `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"` File *File `protobuf:"bytes,8,opt,name=file,proto3" json:"file,omitempty"` Status JobStatus `protobuf:"varint,9,opt,name=status,proto3,enum=api.JobStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*AlineMessage) Descriptor
deprecated
func (*AlineMessage) Descriptor() ([]byte, []int)
Deprecated: Use AlineMessage.ProtoReflect.Descriptor instead.
func (*AlineMessage) GetAddress ¶
func (x *AlineMessage) GetAddress() string
func (*AlineMessage) GetError ¶ added in v1.0.3
func (x *AlineMessage) GetError() string
func (*AlineMessage) GetExecReq ¶
func (x *AlineMessage) GetExecReq() *ExecuteReq
func (*AlineMessage) GetFile ¶ added in v1.0.3
func (x *AlineMessage) GetFile() *File
func (*AlineMessage) GetLog ¶
func (x *AlineMessage) GetLog() string
func (*AlineMessage) GetName ¶ added in v1.0.3
func (x *AlineMessage) GetName() string
func (*AlineMessage) GetResult ¶
func (x *AlineMessage) GetResult() *ExecuteResult
func (*AlineMessage) GetStatus ¶ added in v1.0.3
func (x *AlineMessage) GetStatus() JobStatus
func (*AlineMessage) GetType ¶
func (x *AlineMessage) GetType() MessageType
func (*AlineMessage) ProtoMessage ¶
func (*AlineMessage) ProtoMessage()
func (*AlineMessage) ProtoReflect ¶
func (x *AlineMessage) ProtoReflect() protoreflect.Message
func (*AlineMessage) Reset ¶
func (x *AlineMessage) Reset()
func (*AlineMessage) String ¶
func (x *AlineMessage) String() string
type AlineRPCClient ¶
type AlineRPCClient interface {
AlineChat(ctx context.Context, opts ...grpc.CallOption) (AlineRPC_AlineChatClient, error)
}
AlineRPCClient is the client API for AlineRPC service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAlineRPCClient ¶
func NewAlineRPCClient(cc grpc.ClientConnInterface) AlineRPCClient
type AlineRPCServer ¶
type AlineRPCServer interface { AlineChat(AlineRPC_AlineChatServer) error // contains filtered or unexported methods }
AlineRPCServer is the server API for AlineRPC service. All implementations must embed UnimplementedAlineRPCServer for forward compatibility
type AlineRPC_AlineChatClient ¶
type AlineRPC_AlineChatClient interface { Send(*AlineMessage) error Recv() (*AlineMessage, error) grpc.ClientStream }
type AlineRPC_AlineChatServer ¶
type AlineRPC_AlineChatServer interface { Send(*AlineMessage) error Recv() (*AlineMessage, error) grpc.ServerStream }
type ExecuteReq ¶
type ExecuteReq struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // pipeline file PipelineFile string `protobuf:"bytes,2,opt,name=pipelineFile,proto3" json:"pipelineFile,omitempty"` // job exec id JobDetailId int64 `protobuf:"varint,3,opt,name=jobDetailId,proto3" json:"jobDetailId,omitempty"` // contains filtered or unexported fields }
func (*ExecuteReq) Descriptor
deprecated
func (*ExecuteReq) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteReq.ProtoReflect.Descriptor instead.
func (*ExecuteReq) GetJobDetailId ¶
func (x *ExecuteReq) GetJobDetailId() int64
func (*ExecuteReq) GetName ¶ added in v1.0.3
func (x *ExecuteReq) GetName() string
func (*ExecuteReq) GetPipelineFile ¶
func (x *ExecuteReq) GetPipelineFile() string
func (*ExecuteReq) ProtoMessage ¶
func (*ExecuteReq) ProtoMessage()
func (*ExecuteReq) ProtoReflect ¶
func (x *ExecuteReq) ProtoReflect() protoreflect.Message
func (*ExecuteReq) Reset ¶
func (x *ExecuteReq) Reset()
func (*ExecuteReq) String ¶
func (x *ExecuteReq) String() string
type ExecuteResult ¶
type ExecuteResult struct { JobName string `protobuf:"bytes,1,opt,name=jobName,proto3" json:"jobName,omitempty"` JobID int64 `protobuf:"varint,2,opt,name=jobID,proto3" json:"jobID,omitempty"` JobStatus int64 `protobuf:"varint,3,opt,name=jobStatus,proto3" json:"jobStatus,omitempty"` Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*ExecuteResult) Descriptor
deprecated
func (*ExecuteResult) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteResult.ProtoReflect.Descriptor instead.
func (*ExecuteResult) GetError ¶ added in v1.0.3
func (x *ExecuteResult) GetError() string
func (*ExecuteResult) GetJobID ¶ added in v1.0.3
func (x *ExecuteResult) GetJobID() int64
func (*ExecuteResult) GetJobName ¶ added in v1.0.3
func (x *ExecuteResult) GetJobName() string
func (*ExecuteResult) GetJobStatus ¶ added in v1.0.3
func (x *ExecuteResult) GetJobStatus() int64
func (*ExecuteResult) ProtoMessage ¶
func (*ExecuteResult) ProtoMessage()
func (*ExecuteResult) ProtoReflect ¶
func (x *ExecuteResult) ProtoReflect() protoreflect.Message
func (*ExecuteResult) Reset ¶
func (x *ExecuteResult) Reset()
func (*ExecuteResult) String ¶
func (x *ExecuteResult) String() string
type File ¶ added in v1.0.3
type File struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*File) Descriptor
deprecated
added in
v1.0.3
func (*File) ProtoMessage ¶ added in v1.0.3
func (*File) ProtoMessage()
func (*File) ProtoReflect ¶ added in v1.0.3
func (x *File) ProtoReflect() protoreflect.Message
type JobStatus ¶ added in v1.0.3
type JobStatus int32
func (JobStatus) Descriptor ¶ added in v1.0.3
func (JobStatus) Descriptor() protoreflect.EnumDescriptor
func (JobStatus) EnumDescriptor
deprecated
added in
v1.0.3
func (JobStatus) Number ¶ added in v1.0.3
func (x JobStatus) Number() protoreflect.EnumNumber
func (JobStatus) Type ¶ added in v1.0.3
func (JobStatus) Type() protoreflect.EnumType
type MessageType ¶ added in v1.0.3
type MessageType int32
const ( MessageType_REGISTER MessageType = 0 MessageType_UNREGISTER MessageType = 1 MessageType_HEARTBEAT MessageType = 2 MessageType_EXECUTE MessageType = 3 MessageType_CANCEL MessageType = 4 MessageType_RESULT MessageType = 5 MessageType_LOG MessageType = 6 MessageType_ERROR MessageType = 7 MessageType_FILE MessageType = 8 MessageType_STATUS MessageType = 9 )
func (MessageType) Descriptor ¶ added in v1.0.3
func (MessageType) Descriptor() protoreflect.EnumDescriptor
func (MessageType) Enum ¶ added in v1.0.3
func (x MessageType) Enum() *MessageType
func (MessageType) EnumDescriptor
deprecated
added in
v1.0.3
func (MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MessageType.Descriptor instead.
func (MessageType) Number ¶ added in v1.0.3
func (x MessageType) Number() protoreflect.EnumNumber
func (MessageType) String ¶ added in v1.0.3
func (x MessageType) String() string
func (MessageType) Type ¶ added in v1.0.3
func (MessageType) Type() protoreflect.EnumType
type UnimplementedAlineRPCServer ¶
type UnimplementedAlineRPCServer struct { }
UnimplementedAlineRPCServer must be embedded to have forward compatible implementations.
func (UnimplementedAlineRPCServer) AlineChat ¶
func (UnimplementedAlineRPCServer) AlineChat(AlineRPC_AlineChatServer) error
type UnsafeAlineRPCServer ¶
type UnsafeAlineRPCServer interface {
// contains filtered or unexported methods
}
UnsafeAlineRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AlineRPCServer will result in compilation errors.