Adding PubSub response type. (#453)

This commit is contained in:
Artur Souza 2020-09-04 12:59:43 -07:00 committed by GitHub
parent 857d5652bd
commit fbd04241b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

23
pubsub/responses.go Normal file
View File

@ -0,0 +1,23 @@
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// ------------------------------------------------------------
package pubsub
// AppResponseStatus represents a status of a PubSub response.
type AppResponseStatus string
const (
// Success means the message is received and processed correctly.
Success AppResponseStatus = "SUCCESS"
// Retry means the message is received but could not be processed and must be retried.
Retry AppResponseStatus = "RETRY"
// Drop means the message is received but should not be processed.
Drop AppResponseStatus = "DROP"
)
// AppResponse is the object describing the response from user code after a pubsub event
type AppResponse struct {
Status AppResponseStatus `json:"status"`
}