api

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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.

View Source
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)

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetData added in v1.0.3

func (x *File) GetData() []byte

func (*File) GetPath added in v1.0.3

func (x *File) GetPath() string

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

func (*File) Reset added in v1.0.3

func (x *File) Reset()

func (*File) String added in v1.0.3

func (x *File) String() string

type JobStatus added in v1.0.3

type JobStatus int32
const (
	JobStatus_NOTRUN  JobStatus = 0
	JobStatus_RUNNING JobStatus = 1
	JobStatus_FAIL    JobStatus = 2
	JobStatus_SUCCESS JobStatus = 3
	JobStatus_STOP    JobStatus = 4
)

func (JobStatus) Descriptor added in v1.0.3

func (JobStatus) Descriptor() protoreflect.EnumDescriptor

func (JobStatus) Enum added in v1.0.3

func (x JobStatus) Enum() *JobStatus

func (JobStatus) EnumDescriptor deprecated added in v1.0.3

func (JobStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use JobStatus.Descriptor instead.

func (JobStatus) Number added in v1.0.3

func (x JobStatus) Number() protoreflect.EnumNumber

func (JobStatus) String added in v1.0.3

func (x JobStatus) String() string

func (JobStatus) Type added in v1.0.3

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) 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

type UnimplementedAlineRPCServer

type UnimplementedAlineRPCServer struct {
}

UnimplementedAlineRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedAlineRPCServer) AlineChat

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL