Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("queue item not found")
ErrNotFound indicates the requested work item does not exist in the queue.
Functions ¶
func Publish ¶
Publish inserts work at the tail of this queue, waiting for space to become available if the queue is full.
Types ¶
type CloseNotifier ¶
type CloseNotifier interface { // CloseNotify returns a channel that receives a single value // when the client connection has gone away. CloseNotify() <-chan bool }
CloseNotifier defines a datastructure that is capable of notifying a subscriber when its connection is closed.
type Queue ¶
type Queue interface { // Publish inserts work at the tail of this queue, waiting for // space to become available if the queue is full. Publish(*Work) error // Remove removes the specified work item from this queue, // if it is present. Remove(*Work) error // PullClose retrieves and removes the head of this queue, // waiting if necessary until work becomes available. Pull() *Work // PullClose retrieves and removes the head of this queue, // waiting if necessary until work becomes available. The // CloseNotifier should be provided to clone the channel // if the subscribing client terminates its connection. PullClose(CloseNotifier) *Work }
func FromContext ¶
FromContext returns the Queue associated with this context.
type Setter ¶
type Setter interface {
Set(string, interface{})
}
Setter defines a context that enables setting values.
type Work ¶
type Work struct { Signed bool `json:"signed"` Verified bool `json:"verified"` Yaml string `json:"config"` YamlEnc string `json:"secret"` Repo *model.Repo `json:"repo"` Build *model.Build `json:"build"` BuildLast *model.Build `json:"build_last"` Job *model.Job `json:"job"` Netrc *model.Netrc `json:"netrc"` Keys *model.Key `json:"keys"` System *model.System `json:"system"` Secrets []*model.Secret `json:"secrets"` User *model.User `json:"user"` }
Work represents an item for work to be processed by a worker.
Click to show internal directories.
Click to hide internal directories.