Documentation
¶
Index ¶
- Variables
- func NewCronEndpoints() []*api.Endpoint
- func RegisterCronHandler(s server.Server, hdlr CronHandler, opts ...server.HandlerOption) error
- type CronHandler
- type CronService
- type DeleteRequest
- type DeleteResponse
- type Job
- func (*Job) Descriptor() ([]byte, []int)deprecated
- func (x *Job) GetCallback() string
- func (x *Job) GetDescription() string
- func (x *Job) GetId() string
- func (x *Job) GetInterval() string
- func (x *Job) GetName() string
- func (*Job) ProtoMessage()
- func (x *Job) ProtoReflect() protoreflect.Message
- func (x *Job) Reset()
- func (x *Job) String() string
- type JobsRequest
- type JobsResponse
- type ScheduleRequest
- func (*ScheduleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ScheduleRequest) GetCallback() string
- func (x *ScheduleRequest) GetDescription() string
- func (x *ScheduleRequest) GetId() string
- func (x *ScheduleRequest) GetInterval() string
- func (x *ScheduleRequest) GetName() string
- func (*ScheduleRequest) ProtoMessage()
- func (x *ScheduleRequest) ProtoReflect() protoreflect.Message
- func (x *ScheduleRequest) Reset()
- func (x *ScheduleRequest) String() string
- type ScheduleResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_cron_proto protoreflect.FileDescriptor
Functions ¶
func NewCronEndpoints ¶
func RegisterCronHandler ¶
func RegisterCronHandler(s server.Server, hdlr CronHandler, opts ...server.HandlerOption) error
Types ¶
type CronHandler ¶
type CronHandler interface { Schedule(context.Context, *ScheduleRequest, *ScheduleResponse) error Delete(context.Context, *DeleteRequest, *DeleteResponse) error Jobs(context.Context, *JobsRequest, *JobsResponse) error }
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) GetCallback ¶
func (*Job) GetDescription ¶
func (*Job) GetInterval ¶
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
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
Click to show internal directories.
Click to hide internal directories.