scheduler

package
v1.1.138 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package scheduler is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Scheduler_CreateSchedulingJob_FullMethodName        = "/scheduler.Scheduler/createSchedulingJob"
	Scheduler_GetSchedulingJob_FullMethodName           = "/scheduler.Scheduler/getSchedulingJob"
	Scheduler_UpdateSchedulingJob_FullMethodName        = "/scheduler.Scheduler/updateSchedulingJob"
	Scheduler_PatchSchedulingJob_FullMethodName         = "/scheduler.Scheduler/patchSchedulingJob"
	Scheduler_DeleteSchedulingJob_FullMethodName        = "/scheduler.Scheduler/deleteSchedulingJob"
	Scheduler_GetSchedulingJobHistory_FullMethodName    = "/scheduler.Scheduler/getSchedulingJobHistory"
	Scheduler_ListSchedulingJobHistories_FullMethodName = "/scheduler.Scheduler/listSchedulingJobHistories"
)

Variables

View Source
var File_io_scheduler_a_rpc_proto protoreflect.FileDescriptor
View Source
var File_io_scheduler_scheduler_proto protoreflect.FileDescriptor
View Source
var Scheduler_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "scheduler.Scheduler",
	HandlerType: (*SchedulerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "createSchedulingJob",
			Handler:    _Scheduler_CreateSchedulingJob_Handler,
		},
		{
			MethodName: "getSchedulingJob",
			Handler:    _Scheduler_GetSchedulingJob_Handler,
		},
		{
			MethodName: "updateSchedulingJob",
			Handler:    _Scheduler_UpdateSchedulingJob_Handler,
		},
		{
			MethodName: "patchSchedulingJob",
			Handler:    _Scheduler_PatchSchedulingJob_Handler,
		},
		{
			MethodName: "deleteSchedulingJob",
			Handler:    _Scheduler_DeleteSchedulingJob_Handler,
		},
		{
			MethodName: "getSchedulingJobHistory",
			Handler:    _Scheduler_GetSchedulingJobHistory_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "listSchedulingJobHistories",
			Handler:       _Scheduler_ListSchedulingJobHistories_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "io/scheduler/a_rpc.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 RegisterSchedulerHandler

func RegisterSchedulerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSchedulerHandler registers the http handlers for service Scheduler to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSchedulerHandlerClient

func RegisterSchedulerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SchedulerClient) error

RegisterSchedulerHandlerClient registers the http handlers for service Scheduler to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SchedulerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SchedulerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SchedulerClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterSchedulerHandlerFromEndpoint

func RegisterSchedulerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSchedulerHandlerFromEndpoint is same as RegisterSchedulerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSchedulerHandlerServer

func RegisterSchedulerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SchedulerServer) error

RegisterSchedulerHandlerServer registers the http handlers for service Scheduler to "mux". UnaryRPC :call SchedulerServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSchedulerHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterSchedulerServer

func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer)

Types

type ListRequest

type ListRequest struct {

	// The id of SchedulingJob.
	// @tag: validateGeneric:"required"
	JobId string `protobuf:"bytes,1,opt,name=jobId,proto3" json:"jobId,omitempty" validateGeneric:"required"`
	// Search filters.
	// @tag: validateGeneric:"omitempty"
	Filters *io.Filters `protobuf:"bytes,2,opt,name=filters,proto3" json:"filters,omitempty" validateGeneric:"omitempty"`
	// contains filtered or unexported fields
}

ListRequest is used to retrieve a list of scheduled executions for a given job. Required Fields: jobId.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetFilters

func (x *ListRequest) GetFilters() *io.Filters

func (*ListRequest) GetJobId

func (x *ListRequest) GetJobId() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type SchedulerClient

type SchedulerClient interface {
	// Creates a scheduling job. Required Fields: scheduleType, protocol, classId, jobName, scheduledTime, timezone.
	CreateSchedulingJob(ctx context.Context, in *ct.SchedulingJob, opts ...grpc.CallOption) (*ct.SchedulingJobResponse, error)
	// Retrieves a scheduling job by its ID. If the job has been deleted, only history logs will be returned. Required Fields: id.
	GetSchedulingJob(ctx context.Context, in *io.Id, opts ...grpc.CallOption) (*ct.SchedulingJob, error)
	// Updates an existing scheduling job. The full SchedulingJob object must be supplied. Empty/null fields will overwrite existing data. Required Fields: id, scheduleType, protocol, classId, jobName, scheduledTime, timezone.
	UpdateSchedulingJob(ctx context.Context, in *ct.SchedulingJob, opts ...grpc.CallOption) (*ct.SchedulingJobResponse, error)
	// Patch updates a scheduling job. Only supplied fields will be updated. Required Fields: id.
	PatchSchedulingJob(ctx context.Context, in *ct.SchedulingJob, opts ...grpc.CallOption) (*ct.SchedulingJobResponse, error)
	// Deletes a scheduling job by ID. History logs remain available after deletion. Required Fields: id.
	DeleteSchedulingJob(ctx context.Context, in *io.Id, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Retrieves a specific scheduling job history log by ID. Required Fields: id.
	GetSchedulingJobHistory(ctx context.Context, in *io.Id, opts ...grpc.CallOption) (*ct.JobHistory, error)
	// Lists all history logs for a given scheduling job. Required Fields: jobId.
	ListSchedulingJobHistories(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ct.JobHistory], 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.

The PassKit Scheduler API allows you to automate tasks within your PassKit programs. This API allows you to schedule one-time or recurring jobs that interact with other PassKit APIs.

func NewSchedulerClient

func NewSchedulerClient(cc grpc.ClientConnInterface) SchedulerClient

type SchedulerServer

type SchedulerServer interface {
	// Creates a scheduling job. Required Fields: scheduleType, protocol, classId, jobName, scheduledTime, timezone.
	CreateSchedulingJob(context.Context, *ct.SchedulingJob) (*ct.SchedulingJobResponse, error)
	// Retrieves a scheduling job by its ID. If the job has been deleted, only history logs will be returned. Required Fields: id.
	GetSchedulingJob(context.Context, *io.Id) (*ct.SchedulingJob, error)
	// Updates an existing scheduling job. The full SchedulingJob object must be supplied. Empty/null fields will overwrite existing data. Required Fields: id, scheduleType, protocol, classId, jobName, scheduledTime, timezone.
	UpdateSchedulingJob(context.Context, *ct.SchedulingJob) (*ct.SchedulingJobResponse, error)
	// Patch updates a scheduling job. Only supplied fields will be updated. Required Fields: id.
	PatchSchedulingJob(context.Context, *ct.SchedulingJob) (*ct.SchedulingJobResponse, error)
	// Deletes a scheduling job by ID. History logs remain available after deletion. Required Fields: id.
	DeleteSchedulingJob(context.Context, *io.Id) (*emptypb.Empty, error)
	// Retrieves a specific scheduling job history log by ID. Required Fields: id.
	GetSchedulingJobHistory(context.Context, *io.Id) (*ct.JobHistory, error)
	// Lists all history logs for a given scheduling job. Required Fields: jobId.
	ListSchedulingJobHistories(*ListRequest, grpc.ServerStreamingServer[ct.JobHistory]) error
}

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

The PassKit Scheduler API allows you to automate tasks within your PassKit programs. This API allows you to schedule one-time or recurring jobs that interact with other PassKit APIs.

type Scheduler_ListSchedulingJobHistoriesClient

type Scheduler_ListSchedulingJobHistoriesClient = grpc.ServerStreamingClient[ct.JobHistory]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Scheduler_ListSchedulingJobHistoriesServer

type Scheduler_ListSchedulingJobHistoriesServer = grpc.ServerStreamingServer[ct.JobHistory]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type UnimplementedSchedulerServer

type UnimplementedSchedulerServer struct{}

UnimplementedSchedulerServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSchedulerServer) CreateSchedulingJob

func (UnimplementedSchedulerServer) DeleteSchedulingJob

func (UnimplementedSchedulerServer) DeleteSchedulingJob(context.Context, *io.Id) (*emptypb.Empty, error)

func (UnimplementedSchedulerServer) GetSchedulingJob

func (UnimplementedSchedulerServer) GetSchedulingJobHistory

func (UnimplementedSchedulerServer) GetSchedulingJobHistory(context.Context, *io.Id) (*ct.JobHistory, error)

func (UnimplementedSchedulerServer) ListSchedulingJobHistories

func (UnimplementedSchedulerServer) PatchSchedulingJob

func (UnimplementedSchedulerServer) UpdateSchedulingJob

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