stored

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Counter.ProtoReflect.Descriptor instead.

func (*Counter) GetAttempts

func (x *Counter) GetAttempts() uint32

func (*Counter) GetCount

func (x *Counter) GetCount() uint32

func (*Counter) GetJobPartitionId

func (x *Counter) GetJobPartitionId() uint64

func (*Counter) GetLastTrigger

func (x *Counter) GetLastTrigger() *timestamppb.Timestamp

func (*Counter) ProtoMessage

func (*Counter) ProtoMessage()

func (*Counter) ProtoReflect

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

func (*Counter) Reset

func (x *Counter) Reset()

func (*Counter) String

func (x *Counter) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetBegin

func (m *Job) GetBegin() isJob_Begin

func (*Job) GetDueTime

func (x *Job) GetDueTime() *timestamppb.Timestamp

func (*Job) GetExpiration

func (x *Job) GetExpiration() *timestamppb.Timestamp

func (*Job) GetJob

func (x *Job) GetJob() *api.Job

func (*Job) GetPartitionId

func (x *Job) GetPartitionId() uint64

func (*Job) GetStart

func (x *Job) GetStart() *timestamppb.Timestamp

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 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 added in v0.4.0

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

Jump to

Keyboard shortcuts

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