FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
aws-lambda-runtime-interface-emulator/lambda/core/doc.go at develop · brevdev/aws-lambda-runtime-interface-emulator · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
brevdev
/
aws-lambda-runtime-interface-emulator
Public
forked from
aws/aws-lambda-runtime-interface-emulator
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
aws-lambda-runtime-interface-emulator
/
lambda
/
core
/
doc.go
Copy path
More file actions
More file actions
Latest commit
History
History
History
68 lines (43 loc) · 1.86 KB
Breadcrumbs
aws-lambda-runtime-interface-emulator
/
lambda
/
core
/
doc.go
Copy path
File metadata and controls
68 lines (43 loc) · 1.86 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
/*
Package core provides state objects and synchronization primitives for
managing data flow in the system.
States
Runtime and Agent implement state object design pattern.
Runtime state interface:
type RuntimeState interface {
InitError() error
Ready() error
InvocationResponse() error
InvocationErrorResponse() error
}
Gates
Gates provide synchornization primitives for managing data flow in the system.
Gate is a synchronization aid that allows one or more threads to wait until a
set of operations being performed in other threads completes.
To better understand gates, consider two examples below:
Example 1: main thread is awaiting registered threads to walk through the gate,
and after the last registered thread walked through the gate, gate
condition will be satisfied and main thread will proceed:
[main] // register threads with the gate and start threads ...
[main] g.AwaitGateCondition()
[main] // blocked until gate condition is satisfied
[thread] g.WalkThrough()
[thread] // not blocked
Example 2: main thread is awaiting registered threads to arrive at the gate,
and after the last registered thread arrives at the gate, gate
condition will be satisfied and main thread, along with registered
threads will proceed:
[main] // register threads with the gate and start threads ...
[main] g.AwaitGateCondition()
[main] // blocked until gate condition is satisfied
Flow
Flow wraps a set of specific gates required to implement specific data flow in the system.
Example flows would be INIT, INVOKE and RESET.
Registrations
Registration service manages registrations, it maintains the mapping between registered
parties are events they are registered. Parties not registered in the system will not
be issued events.
*/
package
core
Back
|
FazBrowse Home
|
New Git URL