-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
invocation_processor.go
25 lines (22 loc) · 1.25 KB
/
invocation_processor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.
package invocationlifecycle
// InvocationProcessor is the interface to implement to receive invocation lifecycle hooks
type InvocationProcessor interface {
// OnInvokeStart is the hook triggered when an invocation has started
OnInvokeStart(startDetails *InvocationStartDetails)
// OnInvokeEnd is the hook triggered when an invocation has ended
OnInvokeEnd(endDetails *InvocationEndDetails)
// GetExecutionInfo returns the current execution start information
GetExecutionInfo() *ExecutionStartInfo
}
// InvocationSubProcessor is the interface to implement to receive invocation lifecycle hooks along with the
// invocation context of the request handler.
type InvocationSubProcessor interface {
// OnInvokeStart is the hook triggered when an invocation has started and the request handler context was created,
OnInvokeStart(startDetails *InvocationStartDetails, ctx *RequestHandler)
// OnInvokeEnd is the hook triggered when an invocation has ended
OnInvokeEnd(endDetails *InvocationEndDetails, ctx *RequestHandler)
}