-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
905 additions
and
161 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package event | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/serverless/event-gateway/functions" | ||
) | ||
|
||
// SystemEventReceivedType is a system event emmited when the Event Gateway receives an event. | ||
const SystemEventReceivedType = Type("gateway.event.received") | ||
|
||
// SystemEventReceivedData struct. | ||
type SystemEventReceivedData struct { | ||
Path string `json:"path"` | ||
Event Event `json:"event"` | ||
Headers http.Header `json:"header"` | ||
} | ||
|
||
// SystemFunctionInvokingType is a system event emmited before invoking a function. | ||
const SystemFunctionInvokingType = Type("gateway.function.invoking") | ||
|
||
// SystemFunctionInvokingData struct. | ||
type SystemFunctionInvokingData struct { | ||
FunctionID functions.FunctionID `json:"functionId"` | ||
Event Event `json:"event"` | ||
} | ||
|
||
// SystemFunctionInvokedType is a system event emmited after successful function invocation. | ||
const SystemFunctionInvokedType = Type("gateway.function.invoked") | ||
|
||
// SystemFunctionInvokedData struct. | ||
type SystemFunctionInvokedData struct { | ||
FunctionID functions.FunctionID `json:"functionId"` | ||
Event Event `json:"event"` | ||
Result []byte `json:"result"` | ||
} | ||
|
||
// SystemFunctionInvocationFailedType is a system event emmited after successful function invocation. | ||
const SystemFunctionInvocationFailedType = Type("gateway.function.invocationFailed") | ||
|
||
// SystemFunctionInvocationFailedData struct. | ||
type SystemFunctionInvocationFailedData struct { | ||
FunctionID functions.FunctionID `json:"functionId"` | ||
Event Event `json:"event"` | ||
Error []byte `json:"result"` | ||
} |
Oops, something went wrong.