notifications

package
v0.0.0-...-d7353a2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package notifications contains the logic about send Swarming notifications.

Package notifications contains the logic about send Swarming notifications.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSubNotification

type PubSubNotification struct {
	TaskID   string `json:"task_id"`
	Userdata string `json:"userdata"`
}

PubSubNotification defines the message schema for Swarming to send the task completion PubSub message. The message attributes may contain "auth_token" if users provided it.

type PubSubNotifier

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

func NewPubSubNotifier

func NewPubSubNotifier(ctx context.Context, cloudProj string) (*PubSubNotifier, error)

NewPubSubNotifier initializes a PubSubNotifier.

func (*PubSubNotifier) RegisterTQTasks

func (ps *PubSubNotifier) RegisterTQTasks(disp *tq.Dispatcher)

RegisterTQTasks registers task queue handlers.

Tasks are actually submitted from the Python side.

func (*PubSubNotifier) Stop

func (ps *PubSubNotifier) Stop()

Stop properly stops the PubSubNotifier.

Directories

Path Synopsis
Package taskspb contains Cloud Tasks proto definations which will be used for sending notifications.
Package taskspb contains Cloud Tasks proto definations which will be used for sending notifications.

Jump to

Keyboard shortcuts

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