Skip to content

Commit 5dd4c54

Browse files
weltekialexellis
authored andcommitted
Add Labels and Environment fields to QueueRequest struct
Support passing additional metadata for a function to the queue-worker. Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
1 parent c81f542 commit 5dd4c54

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

types/queue.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,18 @@ type QueueRequest struct {
3232
// for default.
3333
QueueName string `json:"QueueName,omitempty"`
3434

35-
// Annotations defines a collection of meta-data that can be used by
36-
// the queue worker when processing the queued request.
35+
// Subset of annotations to pass on to the queue-worker
36+
// for processing the queued request.
3737
Annotations map[string]string `json:"Annotations,omitempty"`
3838

39+
// Subset of labels to pass on to the queue-worker
40+
// for processing the queued request.
41+
Labels map[string]string `json:"Labels,omitempty"`
42+
43+
// Subset of environment variables to pass on to the queue-worker
44+
// for processing the queued request.
45+
Environment map[string]string `json:"Environment,omitempty"`
46+
3947
// Used by queue worker to submit a result
4048
CallbackURL *url.URL `json:"CallbackUrl,omitempty"`
4149
}

0 commit comments

Comments
 (0)