Documentation
¶
Index ¶
- Variables
- type Counter
- func (*Counter) Descriptor() ([]byte, []int)deprecated
- func (x *Counter) GetAttempts() uint32
- func (x *Counter) GetCount() uint32
- func (x *Counter) GetJobPartitionId() uint64
- func (x *Counter) GetLastTrigger() *timestamppb.Timestamp
- func (*Counter) ProtoMessage()
- func (x *Counter) ProtoReflect() protoreflect.Message
- func (x *Counter) Reset()
- func (x *Counter) String() string
- type Job
- func (*Job) Descriptor() ([]byte, []int)deprecated
- func (m *Job) GetBegin() isJob_Begin
- func (x *Job) GetDueTime() *timestamppb.Timestamp
- func (x *Job) GetExpiration() *timestamppb.Timestamp
- func (x *Job) GetJob() *api.Job
- func (x *Job) GetPartitionId() uint64
- func (x *Job) GetStart() *timestamppb.Timestamp
- func (*Job) ProtoMessage()
- func (x *Job) ProtoReflect() protoreflect.Message
- func (x *Job) Reset()
- func (x *Job) String() string
- type Job_DueTime
- type Job_Start
- type Leadership
- func (*Leadership) Descriptor() ([]byte, []int)deprecated
- func (x *Leadership) GetReplicaData() *anypb.Any
- func (x *Leadership) GetTotal() uint64
- func (x *Leadership) GetUid() uint64
- func (*Leadership) ProtoMessage()
- func (x *Leadership) ProtoReflect() protoreflect.Message
- func (x *Leadership) Reset()
- func (x *Leadership) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_stored_counter_proto protoreflect.FileDescriptor
View Source
var File_proto_stored_job_proto protoreflect.FileDescriptor
View Source
var File_proto_stored_leadership_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct {
// job_partition_id is the parition_id of the job this counter belongs to.
// Prevents an updated job from inheriting the counter of a previous job with
// the same name.
// Doesn't need to be globally unique.
JobPartitionId uint64 `protobuf:"varint,1,opt,name=job_partition_id,json=jobPartitionId,proto3" json:"job_partition_id,omitempty"`
// count is the number of times the job has been triggered.
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// last_trigger is the timestamp the job was last triggered. Used to
// determine the next time the job should be triggered.
LastTrigger *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_trigger,json=lastTrigger,proto3" json:"last_trigger,omitempty"`
// attempts is the number of times the job has been attempted to be triggered
// at this count. Used by failure policy to track how many times the Job
// trigger should be retried.
Attempts uint32 `protobuf:"varint,4,opt,name=attempts,proto3" json:"attempts,omitempty"`
// contains filtered or unexported fields
}
Counter holds counter information for a given job.
func (*Counter) Descriptor
deprecated
func (*Counter) GetAttempts ¶
func (*Counter) GetJobPartitionId ¶
func (*Counter) GetLastTrigger ¶
func (x *Counter) GetLastTrigger() *timestamppb.Timestamp
func (*Counter) ProtoMessage ¶
func (*Counter) ProtoMessage()
func (*Counter) ProtoReflect ¶
func (x *Counter) ProtoReflect() protoreflect.Message
type Job ¶
type Job struct {
// partion_id is an identifier for the job, used for distinguishing jobs with
// the same name and assigning the job to a partition.
// Doesn't need to be globally unique.
PartitionId uint64 `protobuf:"varint,1,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"`
// begin is the beginning time of the job.
//
// Types that are assignable to Begin:
//
// *Job_Start
// *Job_DueTime
Begin isJob_Begin `protobuf_oneof:"begin"`
// expiration is the optional time at which the job should no longer be
// scheduled and will be ignored and garbage collected thereafter.
// A job may be removed earlier if repeats are exhausted or schedule doesn't
// permit.
Expiration *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expiration,proto3,oneof" json:"expiration,omitempty"`
// job is the job spec.
Job *api.Job `protobuf:"bytes,5,opt,name=job,proto3" json:"job,omitempty"`
// contains filtered or unexported fields
}
Job is the wrapped stored version of a Job which has a partition_id associated.
func (*Job) Descriptor
deprecated
func (*Job) GetDueTime ¶
func (x *Job) GetDueTime() *timestamppb.Timestamp
func (*Job) GetExpiration ¶
func (x *Job) GetExpiration() *timestamppb.Timestamp
func (*Job) GetPartitionId ¶
func (*Job) GetStart ¶
func (x *Job) GetStart() *timestamppb.Timestamp
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type Job_DueTime ¶
type Job_DueTime struct {
// due_time is the epoch time of the job whereby the clock starts on the
// schedule. The job _will_ trigger at this time.
DueTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=due_time,json=dueTime,proto3,oneof"`
}
type Job_Start ¶
type Job_Start struct {
// start is the epoch time of the job whereby the clock starts on the
// schedule. The job _will not_ trigger at this time.
Start *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start,proto3,oneof"`
}
type Leadership ¶
type Leadership struct {
// total is this replicas understanding of the total number of partition
// replicas.
Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
// uid is a unique identifier for this replica. Ensures a single replica
// is the leader for a given partition.
Uid uint64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
// replica_data is custom data that is associated with this leader (replica).
// All leader data will be sent to library consumer on leadership table
// updates.
ReplicaData *anypb.Any `protobuf:"bytes,3,opt,name=replica_data,json=replicaData,proto3,oneof" json:"replica_data,omitempty"`
// contains filtered or unexported fields
}
Leadership is the message written to the leadership table when the replica gains ownership of the leader key.
func (*Leadership) Descriptor
deprecated
func (*Leadership) Descriptor() ([]byte, []int)
Deprecated: Use Leadership.ProtoReflect.Descriptor instead.
func (*Leadership) GetReplicaData ¶
func (x *Leadership) GetReplicaData() *anypb.Any
func (*Leadership) GetTotal ¶
func (x *Leadership) GetTotal() uint64
func (*Leadership) GetUid ¶
func (x *Leadership) GetUid() uint64
func (*Leadership) ProtoMessage ¶
func (*Leadership) ProtoMessage()
func (*Leadership) ProtoReflect ¶
func (x *Leadership) ProtoReflect() protoreflect.Message
func (*Leadership) Reset ¶
func (x *Leadership) Reset()
func (*Leadership) String ¶
func (x *Leadership) String() string
Click to show internal directories.
Click to hide internal directories.