Version: v19.0.0 Latest Latest

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

Go to latest
Published: Oct 7, 2019 License: MPL-2.0 Imports: 2 Imported by: 0



The purge-cache service, typically available at ``, is responsible for publishing a pulse message for workers, so they can purge cache upon request.

This document describes the exchange offered for workers by the cache-purge service.


How to use this package

This package is designed to sit on top of 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:


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{}.



This section is empty.


This section is empty.


This section is empty.


type PurgeCache

type PurgeCache struct {
	RoutingKeyKind string `mwords:"*"`
	ProvisionerID  string `mwords:"*"`
	WorkerType     string `mwords:"*"`

When a cache purge is requested a message will be posted on this exchange with designated `provisionerId` and `workerType` in the routing-key and the name of the `cacheFolder` as payload


func (PurgeCache) ExchangeName

func (binding PurgeCache) ExchangeName() string

func (PurgeCache) NewPayloadObject

func (binding PurgeCache) NewPayloadObject() interface{}

func (PurgeCache) RoutingKey

func (binding PurgeCache) RoutingKey() string

type PurgeCacheMessage

type PurgeCacheMessage struct {

	// Name of cache to purge. Notice that if a `workerType` have multiple kinds
	// of caches (with independent names), it should purge all caches identified
	// by `cacheName` regardless of cache type.
	// See
	CacheName string `json:"cacheName"`

	// `provisionerId` under which the `workerType` we want to purge for exists.
	// Syntax:     ^([a-zA-Z0-9-_]*)$
	// Min length: 1
	// Max length: 22
	// See
	ProvisionerID string `json:"provisionerId"`

	// Message version
	// Possible values:
	//   * 1
	// See
	Version int64 `json:"version"`

	// `workerType` we wish to purge cache for.
	// Syntax:     ^([a-zA-Z0-9-_]*)$
	// Min length: 1
	// Max length: 22
	// See
	WorkerType string `json:"workerType"`

Message reporting that a specific cache should be purged


Jump to

Keyboard shortcuts

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