Documentation ¶
Overview ¶
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 http://godoc.org/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 ChannelMessage ¶
type ChannelMessage struct { // Channel to post the message in. // // Syntax: ^[#&][^ ,\u0007]{1,199}$ // Min length: 1 Channel string `json:"channel"` // IRC message to send as plain text. // // Min length: 1 // Max length: 510 Message string `json:"message"` }
Request to post a message on IRC.
type IrcRequest ¶
A message which is to be sent to an irc channel or user is published to this exchange
See #ircRequest
func (IrcRequest) ExchangeName ¶
func (binding IrcRequest) ExchangeName() string
func (IrcRequest) NewPayloadObject ¶
func (binding IrcRequest) NewPayloadObject() interface{}
func (IrcRequest) RoutingKey ¶
func (binding IrcRequest) RoutingKey() string
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 ¶
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 (Notify) NewPayloadObject ¶
func (binding Notify) NewPayloadObject() interface{}
func (Notify) RoutingKey ¶
type PostIRCMessageRequest ¶
type PostIRCMessageRequest json.RawMessage
Request to post a message on IRC.
One of:
- ChannelMessage
- PrivateMessage
func (*PostIRCMessageRequest) MarshalJSON ¶
func (this *PostIRCMessageRequest) MarshalJSON() ([]byte, error)
MarshalJSON calls json.RawMessage method of the same name. Required since PostIRCMessageRequest is of type json.RawMessage...
func (*PostIRCMessageRequest) UnmarshalJSON ¶
func (this *PostIRCMessageRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON is a copy of the json.RawMessage implementation.
type PrivateMessage ¶
type PrivateMessage struct { // IRC message to send as plain text. // // Min length: 1 // Max length: 510 Message string `json:"message"` // User to post the message to. // // Syntax: ^[A-Za-z\[\]\\~_\^{|}][A-Za-z0-9\-\[\]\\~_\^{|}]{0,254}$ // Min length: 1 // Max length: 255 User string `json:"user"` }
Request to post a message on IRC.