rdb

package
v0.0.0-...-468bb8e Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package rdb provides functionality for notifying ResultDB of successfully merged invocations.

This includes the Task Queue handler, and task for invoking ResultDB's MarkInvocationSubmitted RPC. Preparation for making that RPC includes determining all associated builds and generating invocation ids.

Index

Constants

This section is empty.

Variables

View Source
var File_go_chromium_org_luci_cv_internal_run_rdb_tasks_proto protoreflect.FileDescriptor

Functions

func MarkInvocationSubmitted

func MarkInvocationSubmitted(ctx context.Context, clientFactory RecorderClientFactory, id common.RunID) error

MarkInvocationSubmitted marks all builds under the given run submitted through ResultDB.

func NewMockRecorderClientFactory

func NewMockRecorderClientFactory(ctl *gomock.Controller) *mockClientFactory

Types

type MarkInvocationSubmittedTask

type MarkInvocationSubmittedTask struct {

	// Idenifier for the run. See doc for type `common.RunID` about the format.
	RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	// contains filtered or unexported fields
}

MarkInvocationSubmittedTask marks all builds for the given run as submitted through ResultDB.

Queue: "rdb-notifier".

func (*MarkInvocationSubmittedTask) Descriptor deprecated

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

Deprecated: Use MarkInvocationSubmittedTask.ProtoReflect.Descriptor instead.

func (*MarkInvocationSubmittedTask) GetRunId

func (x *MarkInvocationSubmittedTask) GetRunId() string

func (*MarkInvocationSubmittedTask) ProtoMessage

func (*MarkInvocationSubmittedTask) ProtoMessage()

func (*MarkInvocationSubmittedTask) ProtoReflect

func (*MarkInvocationSubmittedTask) Reset

func (x *MarkInvocationSubmittedTask) Reset()

func (*MarkInvocationSubmittedTask) String

func (x *MarkInvocationSubmittedTask) String() string

type Notifier

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

func NewNotifier

func NewNotifier(tqd *tq.Dispatcher, clientFactory RecorderClientFactory) *Notifier

NewNotifier creates a new Notifier, registering it to the given TQ dispatcher.

func (*Notifier) Schedule

func (n *Notifier) Schedule(ctx context.Context, id common.RunID) error

Schedule enqueues a task to mark the builds in the given run submitted to ResultDB.

type RecorderClient

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

func (*RecorderClient) MarkInvocationSubmitted

func (rc *RecorderClient) MarkInvocationSubmitted(ctx context.Context, invocation string) error

type RecorderClientFactory

type RecorderClientFactory interface {
	MakeClient(ctx context.Context, host string) (*RecorderClient, error)
}

func NewRecorderClientFactory

func NewRecorderClientFactory() RecorderClientFactory

Jump to

Keyboard shortcuts

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