tqpb

package
v0.0.0-...-110cdec Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_go_chromium_org_luci_server_tq_internal_tqpb_payload_proto protoreflect.FileDescriptor
View Source
var File_go_chromium_org_luci_server_tq_internal_tqpb_tasks_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Payload

type Payload struct {

	// Fields used for monitoring and logging only.
	TaskClass string                 `protobuf:"bytes,1,opt,name=task_class,json=taskClass,proto3" json:"task_class,omitempty"` // corresponding TaskClass.ID
	Created   *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`                      // when AddTask was called
	// Actual payload. We store them as blobs to avoid depending on Google Cloud
	// raw *.proto files which are not quite trivial to link to without Bazel.
	//
	// Types that are assignable to Payload:
	//
	//	*Payload_CreateTaskRequest
	//	*Payload_PublishRequest
	Payload isPayload_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

Payload is stored inside reminder records.

It is prepared by the dispatcher and consumed by the sweeper and submitters.

func (*Payload) Descriptor deprecated

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

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetCreateTaskRequest

func (x *Payload) GetCreateTaskRequest() []byte

func (*Payload) GetCreated

func (x *Payload) GetCreated() *timestamppb.Timestamp

func (*Payload) GetPayload

func (m *Payload) GetPayload() isPayload_Payload

func (*Payload) GetPublishRequest

func (x *Payload) GetPublishRequest() []byte

func (*Payload) GetTaskClass

func (x *Payload) GetTaskClass() string

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

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

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

type Payload_CreateTaskRequest

type Payload_CreateTaskRequest struct {
	CreateTaskRequest []byte `protobuf:"bytes,20,opt,name=create_task_request,json=createTaskRequest,proto3,oneof"` // serialized cloud.tasks.v2.CreateTaskRequest
}

type Payload_PublishRequest

type Payload_PublishRequest struct {
	PublishRequest []byte `protobuf:"bytes,21,opt,name=publish_request,json=publishRequest,proto3,oneof"` // serialized pubsub.v1.PublishRequest
}

type SweepTask

type SweepTask struct {

	// DB is an identifier of the database used for reminders.
	//
	// It must be registered in the process that does the sweeping.
	Db string `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	// Partition specifies the range of keys to scan as [Low..High).
	//
	// It is a string of the form "<hex-low>_<hex-high>".
	Partition string `protobuf:"bytes,2,opt,name=partition,proto3" json:"partition,omitempty"`
	// Identifies a registered Lessor implementation to grab leases through.
	LessorId string `protobuf:"bytes,3,opt,name=lessor_id,json=lessorId,proto3" json:"lessor_id,omitempty"`
	// Identifier of a lease section ID to grab leases on sub-partitions through.
	LeaseSectionId string `protobuf:"bytes,4,opt,name=lease_section_id,json=leaseSectionId,proto3" json:"lease_section_id,omitempty"`
	// Total number of shards used when this task was generated.
	//
	// Used FYI only in logs.
	ShardCount int32 `protobuf:"varint,5,opt,name=shard_count,json=shardCount,proto3" json:"shard_count,omitempty"`
	// Shard number in the range of [0 .. Shards).
	//
	// Used FYI only in logs.
	ShardIndex int32 `protobuf:"varint,6,opt,name=shard_index,json=shardIndex,proto3" json:"shard_index,omitempty"`
	// Level counts recursion level for monitoring/debugging purposes.
	//
	// The root sweeper triggers tasks at level=0. If there is a big backlog,
	// level=0 task will offload some work to level=1 tasks. level > 1 should not
	// normally happen and indicates either a bug or a very overloaded system.
	//
	// level > 2 won't be executed at all.
	Level int32 `protobuf:"varint,7,opt,name=level,proto3" json:"level,omitempty"`
	// Length of the reminder keys in the partition.
	//
	// Used to figure out the upper bound of the scan. Usually 16.
	KeySpaceBytes int32 `protobuf:"varint,8,opt,name=key_space_bytes,json=keySpaceBytes,proto3" json:"key_space_bytes,omitempty"`
	// Caps maximum number of reminders to process.
	//
	// Usually in hundreds.
	TasksPerScan int32 `protobuf:"varint,9,opt,name=tasks_per_scan,json=tasksPerScan,proto3" json:"tasks_per_scan,omitempty"`
	// Caps the number of follow-up scans.
	//
	// Usually 16.
	SecondaryScanShards int32 `protobuf:"varint,10,opt,name=secondary_scan_shards,json=secondaryScanShards,proto3" json:"secondary_scan_shards,omitempty"`
	// contains filtered or unexported fields
}

SweepTask is used to distribute sweeping work items and options when doing distributed sweeps.

All fields are required.

func (*SweepTask) Descriptor deprecated

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

Deprecated: Use SweepTask.ProtoReflect.Descriptor instead.

func (*SweepTask) GetDb

func (x *SweepTask) GetDb() string

func (*SweepTask) GetKeySpaceBytes

func (x *SweepTask) GetKeySpaceBytes() int32

func (*SweepTask) GetLeaseSectionId

func (x *SweepTask) GetLeaseSectionId() string

func (*SweepTask) GetLessorId

func (x *SweepTask) GetLessorId() string

func (*SweepTask) GetLevel

func (x *SweepTask) GetLevel() int32

func (*SweepTask) GetPartition

func (x *SweepTask) GetPartition() string

func (*SweepTask) GetSecondaryScanShards

func (x *SweepTask) GetSecondaryScanShards() int32

func (*SweepTask) GetShardCount

func (x *SweepTask) GetShardCount() int32

func (*SweepTask) GetShardIndex

func (x *SweepTask) GetShardIndex() int32

func (*SweepTask) GetTasksPerScan

func (x *SweepTask) GetTasksPerScan() int32

func (*SweepTask) ProtoMessage

func (*SweepTask) ProtoMessage()

func (*SweepTask) ProtoReflect

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

func (*SweepTask) Reset

func (x *SweepTask) Reset()

func (*SweepTask) String

func (x *SweepTask) String() string

Jump to

Keyboard shortcuts

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