cron

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_cron_proto protoreflect.FileDescriptor

Functions

func NewCronEndpoints

func NewCronEndpoints() []*api.Endpoint

func RegisterCronHandler

func RegisterCronHandler(s server.Server, hdlr CronHandler, opts ...server.HandlerOption) error

Types

type CronService

type CronService interface {
	Schedule(ctx context.Context, in *ScheduleRequest, opts ...client.CallOption) (*ScheduleResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error)
	Jobs(ctx context.Context, in *JobsRequest, opts ...client.CallOption) (*JobsResponse, error)
}

func NewCronService

func NewCronService(name string, c client.Client) CronService

type DeleteRequest

type DeleteRequest struct {

	// id of the cron job
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Delete a cron job

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	// contains filtered or unexported fields
}

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type Job

type Job struct {

	// job id
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// description
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// scheduled interval
	Interval string `protobuf:"bytes,4,opt,name=interval,proto3" json:"interval,omitempty"`
	// callback url
	Callback string `protobuf:"bytes,5,opt,name=callback,proto3" json:"callback,omitempty"`
	// contains filtered or unexported fields
}

a cron job

func (*Job) Descriptor deprecated

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

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetCallback

func (x *Job) GetCallback() string

func (*Job) GetDescription

func (x *Job) GetDescription() string

func (*Job) GetId

func (x *Job) GetId() string

func (*Job) GetInterval

func (x *Job) GetInterval() string

func (*Job) GetName

func (x *Job) GetName() 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 JobsRequest

type JobsRequest struct {
	// contains filtered or unexported fields
}

List all cron jobs

func (*JobsRequest) Descriptor deprecated

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

Deprecated: Use JobsRequest.ProtoReflect.Descriptor instead.

func (*JobsRequest) ProtoMessage

func (*JobsRequest) ProtoMessage()

func (*JobsRequest) ProtoReflect

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

func (*JobsRequest) Reset

func (x *JobsRequest) Reset()

func (*JobsRequest) String

func (x *JobsRequest) String() string

type JobsResponse

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

func (*JobsResponse) Descriptor deprecated

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

Deprecated: Use JobsResponse.ProtoReflect.Descriptor instead.

func (*JobsResponse) GetJobs

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

func (*JobsResponse) ProtoMessage

func (*JobsResponse) ProtoMessage()

func (*JobsResponse) ProtoReflect

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

func (*JobsResponse) Reset

func (x *JobsResponse) Reset()

func (*JobsResponse) String

func (x *JobsResponse) String() string

type ScheduleRequest

type ScheduleRequest struct {

	// unique id of job
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// name of cron
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// description
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// interval cron
	Interval string `protobuf:"bytes,4,opt,name=interval,proto3" json:"interval,omitempty"`
	// callback url
	Callback string `protobuf:"bytes,5,opt,name=callback,proto3" json:"callback,omitempty"`
	// contains filtered or unexported fields
}

Schedule a cron job

func (*ScheduleRequest) Descriptor deprecated

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

Deprecated: Use ScheduleRequest.ProtoReflect.Descriptor instead.

func (*ScheduleRequest) GetCallback

func (x *ScheduleRequest) GetCallback() string

func (*ScheduleRequest) GetDescription

func (x *ScheduleRequest) GetDescription() string

func (*ScheduleRequest) GetId

func (x *ScheduleRequest) GetId() string

func (*ScheduleRequest) GetInterval

func (x *ScheduleRequest) GetInterval() string

func (*ScheduleRequest) GetName

func (x *ScheduleRequest) GetName() string

func (*ScheduleRequest) ProtoMessage

func (*ScheduleRequest) ProtoMessage()

func (*ScheduleRequest) ProtoReflect

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

func (*ScheduleRequest) Reset

func (x *ScheduleRequest) Reset()

func (*ScheduleRequest) String

func (x *ScheduleRequest) String() string

type ScheduleResponse

type ScheduleResponse struct {
	Job *Job `protobuf:"bytes,1,opt,name=job,proto3" json:"job,omitempty"`
	// contains filtered or unexported fields
}

func (*ScheduleResponse) Descriptor deprecated

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

Deprecated: Use ScheduleResponse.ProtoReflect.Descriptor instead.

func (*ScheduleResponse) GetJob

func (x *ScheduleResponse) GetJob() *Job

func (*ScheduleResponse) ProtoMessage

func (*ScheduleResponse) ProtoMessage()

func (*ScheduleResponse) ProtoReflect

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

func (*ScheduleResponse) Reset

func (x *ScheduleResponse) Reset()

func (*ScheduleResponse) String

func (x *ScheduleResponse) String() string

Jump to

Keyboard shortcuts

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