services

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Base_GetInfo_FullMethodName  = "/services.Base/GetInfo"
	Base_GetFuncs_FullMethodName = "/services.Base/GetFuncs"
)
View Source
const (
	Scheduler_AddJob_FullMethodName        = "/services.Scheduler/AddJob"
	Scheduler_GetJob_FullMethodName        = "/services.Scheduler/GetJob"
	Scheduler_GetAllJobs_FullMethodName    = "/services.Scheduler/GetAllJobs"
	Scheduler_UpdateJob_FullMethodName     = "/services.Scheduler/UpdateJob"
	Scheduler_DeleteJob_FullMethodName     = "/services.Scheduler/DeleteJob"
	Scheduler_DeleteAllJobs_FullMethodName = "/services.Scheduler/DeleteAllJobs"
	Scheduler_PauseJob_FullMethodName      = "/services.Scheduler/PauseJob"
	Scheduler_ResumeJob_FullMethodName     = "/services.Scheduler/ResumeJob"
	Scheduler_RunJob_FullMethodName        = "/services.Scheduler/RunJob"
	Scheduler_ScheduleJob_FullMethodName   = "/services.Scheduler/ScheduleJob"
	Scheduler_Start_FullMethodName         = "/services.Scheduler/Start"
	Scheduler_Stop_FullMethodName          = "/services.Scheduler/Stop"
)
View Source
const (
	Cluster_GetNodes_FullMethodName = "/services.Cluster/GetNodes"
)

Variables

View Source
var Base_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "services.Base",
	HandlerType: (*BaseServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetInfo",
			Handler:    _Base_GetInfo_Handler,
		},
		{
			MethodName: "GetFuncs",
			Handler:    _Base_GetFuncs_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "base.proto",
}

Base_ServiceDesc is the grpc.ServiceDesc for Base 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 Cluster_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "services.Cluster",
	HandlerType: (*ClusterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetNodes",
			Handler:    _Cluster_GetNodes_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cluster.proto",
}

Cluster_ServiceDesc is the grpc.ServiceDesc for Cluster 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_cluster_proto protoreflect.FileDescriptor
View Source
var File_scheduler_proto protoreflect.FileDescriptor
View Source
var Scheduler_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "services.Scheduler",
	HandlerType: (*SchedulerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddJob",
			Handler:    _Scheduler_AddJob_Handler,
		},
		{
			MethodName: "GetJob",
			Handler:    _Scheduler_GetJob_Handler,
		},
		{
			MethodName: "GetAllJobs",
			Handler:    _Scheduler_GetAllJobs_Handler,
		},
		{
			MethodName: "UpdateJob",
			Handler:    _Scheduler_UpdateJob_Handler,
		},
		{
			MethodName: "DeleteJob",
			Handler:    _Scheduler_DeleteJob_Handler,
		},
		{
			MethodName: "DeleteAllJobs",
			Handler:    _Scheduler_DeleteAllJobs_Handler,
		},
		{
			MethodName: "PauseJob",
			Handler:    _Scheduler_PauseJob_Handler,
		},
		{
			MethodName: "ResumeJob",
			Handler:    _Scheduler_ResumeJob_Handler,
		},
		{
			MethodName: "RunJob",
			Handler:    _Scheduler_RunJob_Handler,
		},
		{
			MethodName: "ScheduleJob",
			Handler:    _Scheduler_ScheduleJob_Handler,
		},
		{
			MethodName: "Start",
			Handler:    _Scheduler_Start_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _Scheduler_Stop_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "scheduler.proto",
}

Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterBaseServer

func RegisterBaseServer(s grpc.ServiceRegistrar, srv BaseServer)

func RegisterClusterServer

func RegisterClusterServer(s grpc.ServiceRegistrar, srv ClusterServer)

func RegisterSchedulerServer

func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer)

Types

type BaseClient

type BaseClient interface {
	GetInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Info, error)
	GetFuncs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Funcs, error)
}

BaseClient is the client API for Base 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 NewBaseClient

func NewBaseClient(cc grpc.ClientConnInterface) BaseClient

type BaseServer

type BaseServer interface {
	GetInfo(context.Context, *emptypb.Empty) (*Info, error)
	GetFuncs(context.Context, *emptypb.Empty) (*Funcs, error)
	// contains filtered or unexported methods
}

BaseServer is the server API for Base service. All implementations must embed UnimplementedBaseServer for forward compatibility

type ClusterClient

type ClusterClient interface {
	GetNodes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Nodes, error)
}

ClusterClient is the client API for Cluster 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 NewClusterClient

func NewClusterClient(cc grpc.ClientConnInterface) ClusterClient

type ClusterServer

type ClusterServer interface {
	GetNodes(context.Context, *emptypb.Empty) (*Nodes, error)
	// contains filtered or unexported methods
}

ClusterServer is the server API for Cluster service. All implementations must embed UnimplementedClusterServer for forward compatibility

type Func

type Func struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*Func) Descriptor deprecated

func (*Func) Descriptor() ([]byte, []int)

Deprecated: Use Func.ProtoReflect.Descriptor instead.

func (*Func) GetInfo

func (x *Func) GetInfo() string

func (*Func) GetName

func (x *Func) GetName() string

func (*Func) ProtoMessage

func (*Func) ProtoMessage()

func (*Func) ProtoReflect

func (x *Func) ProtoReflect() protoreflect.Message

func (*Func) Reset

func (x *Func) Reset()

func (*Func) String

func (x *Func) String() string

type Funcs

type Funcs struct {
	Funcs []*Func `protobuf:"bytes,1,rep,name=funcs,proto3" json:"funcs,omitempty"`
	// contains filtered or unexported fields
}

func (*Funcs) Descriptor deprecated

func (*Funcs) Descriptor() ([]byte, []int)

Deprecated: Use Funcs.ProtoReflect.Descriptor instead.

func (*Funcs) GetFuncs

func (x *Funcs) GetFuncs() []*Func

func (*Funcs) ProtoMessage

func (*Funcs) ProtoMessage()

func (*Funcs) ProtoReflect

func (x *Funcs) ProtoReflect() protoreflect.Message

func (*Funcs) Reset

func (x *Funcs) Reset()

func (*Funcs) String

func (x *Funcs) String() string

type Info

type Info struct {
	Info *structpb.Struct `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*Info) Descriptor deprecated

func (*Info) Descriptor() ([]byte, []int)

Deprecated: Use Info.ProtoReflect.Descriptor instead.

func (*Info) GetInfo

func (x *Info) GetInfo() *structpb.Struct

func (*Info) ProtoMessage

func (*Info) ProtoMessage()

func (*Info) ProtoReflect

func (x *Info) ProtoReflect() protoreflect.Message

func (*Info) Reset

func (x *Info) Reset()

func (*Info) String

func (x *Info) String() string

type Job

type Job struct {
	Id          string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Type        string                 `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	StartAt     string                 `protobuf:"bytes,4,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"`
	EndAt       string                 `protobuf:"bytes,5,opt,name=end_at,json=endAt,proto3" json:"end_at,omitempty"`
	Interval    string                 `protobuf:"bytes,6,opt,name=interval,proto3" json:"interval,omitempty"`
	CronExpr    string                 `protobuf:"bytes,7,opt,name=cron_expr,json=cronExpr,proto3" json:"cron_expr,omitempty"`
	Timezone    string                 `protobuf:"bytes,8,opt,name=timezone,proto3" json:"timezone,omitempty"`
	FuncName    string                 `protobuf:"bytes,9,opt,name=func_name,json=funcName,proto3" json:"func_name,omitempty"`
	Args        *structpb.Struct       `protobuf:"bytes,10,opt,name=args,proto3" json:"args,omitempty"`
	Timeout     string                 `protobuf:"bytes,11,opt,name=timeout,proto3" json:"timeout,omitempty"`
	Queues      []string               `protobuf:"bytes,12,rep,name=queues,proto3" json:"queues,omitempty"`
	LastRunTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=last_run_time,json=lastRunTime,proto3" json:"last_run_time,omitempty"`
	NextRunTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=next_run_time,json=nextRunTime,proto3" json:"next_run_time,omitempty"`
	Status      string                 `protobuf:"bytes,15,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*Job) Descriptor deprecated

func (*Job) Descriptor() ([]byte, []int)

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetArgs

func (x *Job) GetArgs() *structpb.Struct

func (*Job) GetCronExpr

func (x *Job) GetCronExpr() string

func (*Job) GetEndAt

func (x *Job) GetEndAt() string

func (*Job) GetFuncName

func (x *Job) GetFuncName() string

func (*Job) GetId

func (x *Job) GetId() string

func (*Job) GetInterval

func (x *Job) GetInterval() string

func (*Job) GetLastRunTime

func (x *Job) GetLastRunTime() *timestamppb.Timestamp

func (*Job) GetName

func (x *Job) GetName() string

func (*Job) GetNextRunTime

func (x *Job) GetNextRunTime() *timestamppb.Timestamp

func (*Job) GetQueues

func (x *Job) GetQueues() []string

func (*Job) GetStartAt

func (x *Job) GetStartAt() string

func (*Job) GetStatus

func (x *Job) GetStatus() string

func (*Job) GetTimeout

func (x *Job) GetTimeout() string

func (*Job) GetTimezone

func (x *Job) GetTimezone() string

func (*Job) GetType

func (x *Job) GetType() string

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) ProtoReflect

func (x *Job) ProtoReflect() protoreflect.Message

func (*Job) Reset

func (x *Job) Reset()

func (*Job) String

func (x *Job) String() string

type JobId

type JobId struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*JobId) Descriptor deprecated

func (*JobId) Descriptor() ([]byte, []int)

Deprecated: Use JobId.ProtoReflect.Descriptor instead.

func (*JobId) GetId

func (x *JobId) GetId() string

func (*JobId) ProtoMessage

func (*JobId) ProtoMessage()

func (*JobId) ProtoReflect

func (x *JobId) ProtoReflect() protoreflect.Message

func (*JobId) Reset

func (x *JobId) Reset()

func (*JobId) String

func (x *JobId) String() string

type Jobs

type Jobs struct {
	Jobs []*Job `protobuf:"bytes,1,rep,name=jobs,proto3" json:"jobs,omitempty"`
	// contains filtered or unexported fields
}

func (*Jobs) Descriptor deprecated

func (*Jobs) Descriptor() ([]byte, []int)

Deprecated: Use Jobs.ProtoReflect.Descriptor instead.

func (*Jobs) GetJobs

func (x *Jobs) GetJobs() []*Job

func (*Jobs) ProtoMessage

func (*Jobs) ProtoMessage()

func (*Jobs) ProtoReflect

func (x *Jobs) ProtoReflect() protoreflect.Message

func (*Jobs) Reset

func (x *Jobs) Reset()

func (*Jobs) String

func (x *Jobs) String() string

type Node

type Node struct {
	EndpointMain      string                 `protobuf:"bytes,1,opt,name=endpoint_main,json=endpointMain,proto3" json:"endpoint_main,omitempty"`
	Endpoint          string                 `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	EndpointGrpc      string                 `protobuf:"bytes,3,opt,name=endpoint_grpc,json=endpointGrpc,proto3" json:"endpoint_grpc,omitempty"`
	EndpointHttp      string                 `protobuf:"bytes,4,opt,name=endpoint_http,json=endpointHttp,proto3" json:"endpoint_http,omitempty"`
	Queue             string                 `protobuf:"bytes,5,opt,name=queue,proto3" json:"queue,omitempty"`
	Mode              string                 `protobuf:"bytes,6,opt,name=mode,proto3" json:"mode,omitempty"`
	Version           string                 `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"`
	Health            bool                   `protobuf:"varint,8,opt,name=health,proto3" json:"health,omitempty"`
	RegisterTime      *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=register_time,json=registerTime,proto3" json:"register_time,omitempty"`
	LastHeartbeatTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=last_heartbeat_time,json=lastHeartbeatTime,proto3" json:"last_heartbeat_time,omitempty"`
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

func (*Node) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetEndpoint

func (x *Node) GetEndpoint() string

func (*Node) GetEndpointGrpc

func (x *Node) GetEndpointGrpc() string

func (*Node) GetEndpointHttp

func (x *Node) GetEndpointHttp() string

func (*Node) GetEndpointMain

func (x *Node) GetEndpointMain() string

func (*Node) GetHealth

func (x *Node) GetHealth() bool

func (*Node) GetLastHeartbeatTime

func (x *Node) GetLastHeartbeatTime() *timestamppb.Timestamp

func (*Node) GetMode

func (x *Node) GetMode() string

func (*Node) GetQueue

func (x *Node) GetQueue() string

func (*Node) GetRegisterTime

func (x *Node) GetRegisterTime() *timestamppb.Timestamp

func (*Node) GetVersion added in v0.6.1

func (x *Node) GetVersion() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type Nodes

type Nodes struct {
	Nodes map[string]*Node `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Nodes) Descriptor deprecated

func (*Nodes) Descriptor() ([]byte, []int)

Deprecated: Use Nodes.ProtoReflect.Descriptor instead.

func (*Nodes) GetNodes

func (x *Nodes) GetNodes() map[string]*Node

func (*Nodes) ProtoMessage

func (*Nodes) ProtoMessage()

func (*Nodes) ProtoReflect

func (x *Nodes) ProtoReflect() protoreflect.Message

func (*Nodes) Reset

func (x *Nodes) Reset()

func (*Nodes) String

func (x *Nodes) String() string

type SchedulerClient

type SchedulerClient interface {
	AddJob(ctx context.Context, in *Job, opts ...grpc.CallOption) (*Job, error)
	GetJob(ctx context.Context, in *JobId, opts ...grpc.CallOption) (*Job, error)
	GetAllJobs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Jobs, error)
	UpdateJob(ctx context.Context, in *Job, opts ...grpc.CallOption) (*Job, error)
	DeleteJob(ctx context.Context, in *JobId, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteAllJobs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	PauseJob(ctx context.Context, in *JobId, opts ...grpc.CallOption) (*Job, error)
	ResumeJob(ctx context.Context, in *JobId, opts ...grpc.CallOption) (*Job, error)
	RunJob(ctx context.Context, in *Job, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ScheduleJob(ctx context.Context, in *Job, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Start(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Stop(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

SchedulerClient is the client API for Scheduler 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 NewSchedulerClient

func NewSchedulerClient(cc grpc.ClientConnInterface) SchedulerClient

type SchedulerServer

type SchedulerServer interface {
	AddJob(context.Context, *Job) (*Job, error)
	GetJob(context.Context, *JobId) (*Job, error)
	GetAllJobs(context.Context, *emptypb.Empty) (*Jobs, error)
	UpdateJob(context.Context, *Job) (*Job, error)
	DeleteJob(context.Context, *JobId) (*emptypb.Empty, error)
	DeleteAllJobs(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	PauseJob(context.Context, *JobId) (*Job, error)
	ResumeJob(context.Context, *JobId) (*Job, error)
	RunJob(context.Context, *Job) (*emptypb.Empty, error)
	ScheduleJob(context.Context, *Job) (*emptypb.Empty, error)
	Start(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	Stop(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

SchedulerServer is the server API for Scheduler service. All implementations must embed UnimplementedSchedulerServer for forward compatibility

type UnimplementedBaseServer

type UnimplementedBaseServer struct {
}

UnimplementedBaseServer must be embedded to have forward compatible implementations.

func (UnimplementedBaseServer) GetFuncs

func (UnimplementedBaseServer) GetInfo

type UnimplementedClusterServer

type UnimplementedClusterServer struct {
}

UnimplementedClusterServer must be embedded to have forward compatible implementations.

func (UnimplementedClusterServer) GetNodes

type UnimplementedSchedulerServer

type UnimplementedSchedulerServer struct {
}

UnimplementedSchedulerServer must be embedded to have forward compatible implementations.

func (UnimplementedSchedulerServer) AddJob

func (UnimplementedSchedulerServer) DeleteAllJobs

func (UnimplementedSchedulerServer) DeleteJob

func (UnimplementedSchedulerServer) GetAllJobs

func (UnimplementedSchedulerServer) GetJob

func (UnimplementedSchedulerServer) PauseJob

func (UnimplementedSchedulerServer) ResumeJob

func (UnimplementedSchedulerServer) RunJob

func (UnimplementedSchedulerServer) ScheduleJob

func (UnimplementedSchedulerServer) Start

func (UnimplementedSchedulerServer) Stop

func (UnimplementedSchedulerServer) UpdateJob

type UnsafeBaseServer

type UnsafeBaseServer interface {
	// contains filtered or unexported methods
}

UnsafeBaseServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BaseServer will result in compilation errors.

type UnsafeClusterServer

type UnsafeClusterServer interface {
	// contains filtered or unexported methods
}

UnsafeClusterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ClusterServer will result in compilation errors.

type UnsafeSchedulerServer

type UnsafeSchedulerServer interface {
	// contains filtered or unexported methods
}

UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SchedulerServer will result in compilation errors.

Jump to

Keyboard shortcuts

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