tchooksevents

package
v44.23.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

This package was generated from the schema defined at /references/hooks/v1/exchanges.json The hooks service is responsible for creating tasks at specific times orin . response to webhooks and API calls.Using this exchange allows us tomake hooks which repsond to particular pulse messagesThese exchanges provide notifications when a hook is created, updatedor deleted. This is so that the listener running in a different hooks process at the other end can direct another listener specified by`hookGroupId` and `hookId` to synchronize its bindings. But you are ofcourse welcome to use these for other purposes, monitoring changes for example.

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 HookChangedMessage

type HookChangedMessage json.RawMessage

Message reporting that a hook has changed

Defined properties:

 struct {

 	// `hookGroupId` of the hook that was changed
 	//
	//  	HookGroupID string `json:"hookGroupId"`

 	// `hookId` of the hook that was changed
 	//
	//  	HookID string `json:"hookId"`
 }

Additional properties allowed

func (*HookChangedMessage) MarshalJSON

func (this *HookChangedMessage) MarshalJSON() ([]byte, error)

MarshalJSON calls json.RawMessage method of the same name. Required since HookChangedMessage is of type json.RawMessage...

func (*HookChangedMessage) UnmarshalJSON

func (this *HookChangedMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON is a copy of the json.RawMessage implementation.

type HookCreated

type HookCreated struct {
	Reserved string `mwords:"#"`
}

Whenever the api receives a request to create apulse based hook, a message is posted to this exchange andthe receiver creates a listener with the bindings, to create a task

See #hookCreated

func (HookCreated) ExchangeName

func (binding HookCreated) ExchangeName() string

func (HookCreated) NewPayloadObject

func (binding HookCreated) NewPayloadObject() interface{}

func (HookCreated) RoutingKey

func (binding HookCreated) RoutingKey() string

type HookDeleted

type HookDeleted struct {
	Reserved string `mwords:"#"`
}

Whenever the api receives a request to delete apulse based hook, a message is posted to this exchange andthe receiver deletes the listener associated with that hook.

See #hookDeleted

func (HookDeleted) ExchangeName

func (binding HookDeleted) ExchangeName() string

func (HookDeleted) NewPayloadObject

func (binding HookDeleted) NewPayloadObject() interface{}

func (HookDeleted) RoutingKey

func (binding HookDeleted) RoutingKey() string

type HookUpdated

type HookUpdated struct {
	Reserved string `mwords:"#"`
}

Whenever the api receives a request to update apulse based hook, a message is posted to this exchange andthe receiver updates the listener associated with that hook.

See #hookUpdated

func (HookUpdated) ExchangeName

func (binding HookUpdated) ExchangeName() string

func (HookUpdated) NewPayloadObject

func (binding HookUpdated) NewPayloadObject() interface{}

func (HookUpdated) RoutingKey

func (binding HookUpdated) RoutingKey() string

Jump to

Keyboard shortcuts

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