Documentation ¶
Overview ¶
Package bblistener listens to build update notifications from Buildbucket Pub/Sub.
Index ¶
- Constants
- Variables
- func Register(tqd *tq.Dispatcher, projectID string, tjNotifier tryjobNotifier, ...) func(context.Context) error
- func StartListenerForTest(ctx context.Context, sub *pubsub.Subscription, tjNotifier tryjobNotifier) func()
- type ListenBBPubsubTask
- func (*ListenBBPubsubTask) Descriptor() ([]byte, []int)deprecated
- func (x *ListenBBPubsubTask) GetDuration() *durationpb.Duration
- func (*ListenBBPubsubTask) ProtoMessage()
- func (x *ListenBBPubsubTask) ProtoReflect() protoreflect.Message
- func (x *ListenBBPubsubTask) Reset()
- func (x *ListenBBPubsubTask) String() string
Constants ¶
View Source
const ( // NumConcurrentListeners defines the number of Buildbucket Pub/Sub // listeners that run concurrently. // // Increase this value if the notification processing speed can't keep up // with the incoming speed. NumConcurrentListeners = 5 // SubscriptionID is the default subscription ID for listening to // Buildbucket build updates. SubscriptionID = "buildbucket-builds" // ListenDuration is how long each listener will running for. // // This should be in sync with the interval of the cron job that kicks the // listener to ensure continuous processing of Buildbucket Pub/Sub events. ListenDuration = 5 * time.Minute )
Variables ¶
View Source
var File_go_chromium_org_luci_cv_internal_buildbucket_listener_task_proto protoreflect.FileDescriptor
Functions ¶
func Register ¶
func Register(tqd *tq.Dispatcher, projectID string, tjNotifier tryjobNotifier, tjUpdater tryjobUpdater) func(context.Context) error
Register registers tasks for listener and returns a function to kick off `NumConcurrentListeners` listeners.
func StartListenerForTest ¶
func StartListenerForTest(ctx context.Context, sub *pubsub.Subscription, tjNotifier tryjobNotifier) func()
StartListenerForTest starts a buildbucket listener for testing purpose.
Returns a callback function to stop the listener.
Types ¶
type ListenBBPubsubTask ¶
type ListenBBPubsubTask struct { // Duration defines how long the listener should listen to Pub/Sub // notifications. Duration *durationpb.Duration `protobuf:"bytes,1,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
ListenBBPubsubTask listens to Buildbucket Pub/Sub and schedules tasks to update Tryjobs that LUCI CV is interested in.
Queue: "listen-bb-pubsub".
func (*ListenBBPubsubTask) Descriptor
deprecated
func (*ListenBBPubsubTask) Descriptor() ([]byte, []int)
Deprecated: Use ListenBBPubsubTask.ProtoReflect.Descriptor instead.
func (*ListenBBPubsubTask) GetDuration ¶
func (x *ListenBBPubsubTask) GetDuration() *durationpb.Duration
func (*ListenBBPubsubTask) ProtoMessage ¶
func (*ListenBBPubsubTask) ProtoMessage()
func (*ListenBBPubsubTask) ProtoReflect ¶
func (x *ListenBBPubsubTask) ProtoReflect() protoreflect.Message
func (*ListenBBPubsubTask) Reset ¶
func (x *ListenBBPubsubTask) Reset()
func (*ListenBBPubsubTask) String ¶
func (x *ListenBBPubsubTask) String() string
Click to show internal directories.
Click to hide internal directories.