scheduler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Scheduler_AddJob_FullMethodName        = "/scheduler.Scheduler/AddJob"
	Scheduler_GetJob_FullMethodName        = "/scheduler.Scheduler/GetJob"
	Scheduler_GetAllJobs_FullMethodName    = "/scheduler.Scheduler/GetAllJobs"
	Scheduler_UpdateJob_FullMethodName     = "/scheduler.Scheduler/UpdateJob"
	Scheduler_DeleteJob_FullMethodName     = "/scheduler.Scheduler/DeleteJob"
	Scheduler_DeleteAllJobs_FullMethodName = "/scheduler.Scheduler/DeleteAllJobs"
	Scheduler_PauseJob_FullMethodName      = "/scheduler.Scheduler/PauseJob"
	Scheduler_ResumeJob_FullMethodName     = "/scheduler.Scheduler/ResumeJob"
	Scheduler_RunJob_FullMethodName        = "/scheduler.Scheduler/RunJob"
	Scheduler_Start_FullMethodName         = "/scheduler.Scheduler/Start"
	Scheduler_Stop_FullMethodName          = "/scheduler.Scheduler/Stop"
)

Variables

View Source
var File_scheduler_proto protoreflect.FileDescriptor
View Source
var Scheduler_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "scheduler.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: "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 RegisterSchedulerServer

func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer)

Types

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"`
	// In standalone mode, `scheduled` will always be `false`,
	// in cluster mode, internal node calls will be set to `true` to prevent round-robin scheduling
	Scheduled bool `protobuf:"varint,16,opt,name=scheduled,proto3" json:"scheduled,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) GetScheduled

func (x *Job) GetScheduled() bool

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

func (UnimplementedSchedulerServer) Stop

func (UnimplementedSchedulerServer) UpdateJob

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