tcnotifyevents

package
v47.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

This package was generated from the schema defined at /references/notify/v1/exchanges.json This pretty much only contains the simple free-form message that can be published from this service from a request by anybody with the proper scopes.

See:

How to use this package

This package is designed to sit on top of https://pkg.go.dev/github.com/taskcluster/pulse-go/pulse. Please read the pulse package overview to get an understanding of how the pulse client is implemented in go.

This package provides two things in addition to the basic pulse package: structured types for unmarshaling pulse message bodies into, and custom Binding interfaces, for defining the fixed strings for task cluster exchange names, and routing keys as structured types.

For example, when specifying a binding, rather than using:

pulse.Bind(
	"*.*.*.*.*.*.gaia.#",
	"exchange/taskcluster-queue/v1/task-defined",
)

You can rather use:

queueevents.TaskDefined{WorkerType: "gaia"}

In addition, this means that you will also get objects in your callback method like *queueevents.TaskDefinedMessage rather than just interface{}.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationMessage

type NotificationMessage struct {

	// Arbitrary message.
	//
	// Additional properties allowed
	Message json.RawMessage `json:"message"`

	// Message version
	//
	// Possible values:
	//   * 1
	Version int64 `json:"version,omitempty"`
}

This can be pretty much anything you want it to be.

type Notify

type Notify struct {
	RoutingKeyKind string `mwords:"*"`
	Reserved       string `mwords:"#"`
}

An arbitrary message that a taskcluster user can trigger if they like.

The standard one that is published by us watching for the completion of tasks is just the task status data that we pull from the queue `status()` endpoint when we notice a task is complete.

See #notify

func (Notify) ExchangeName

func (binding Notify) ExchangeName() string

func (Notify) NewPayloadObject

func (binding Notify) NewPayloadObject() interface{}

func (Notify) RoutingKey

func (binding Notify) RoutingKey() string

Jump to

Keyboard shortcuts

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