-
Notifications
You must be signed in to change notification settings - Fork 5
/
goakt.proto
108 lines (92 loc) · 2.81 KB
/
goakt.proto
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
syntax = "proto3";
package goaktpb;
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/tochemey/goakt/v2/goaktpb;goaktpb";
// Address represents an actor address
message Address {
// Specifies the remote host address
string host = 1;
// Specifies the remote port
int32 port = 2;
// Specifies the actor name
string name = 3;
// Specifies the actor unique id on the remote host
string id = 4;
}
// Deadletter defines the deadletter event
message Deadletter {
// Specifies the sender's address
Address sender = 1;
// Specifies the actor address
Address receiver = 2;
// Specifies the message to send to the actor
// Any proto message is allowed to be sent
google.protobuf.Any message = 3;
// Specifies the message send time
google.protobuf.Timestamp send_time = 4;
// Specifies the reason why the deadletter
string reason = 5;
}
// ActorStarted defines the actor started event
message ActorStarted {
// Specifies the actor address
Address address = 1;
// Specifies the started time
google.protobuf.Timestamp started_at = 2;
}
// ActorStopped defines the actor stopped event
message ActorStopped {
// Specifies the actor address
Address address = 1;
// Specifies the stop time
google.protobuf.Timestamp stopped_at = 2;
}
// ActorPassivated define the actor passivated event
message ActorPassivated {
// Specifies the actor address
Address address = 1;
// Specifies the passivation time
google.protobuf.Timestamp passivated_at = 2;
}
// ActorChildCreated defines the child actor created event
message ActorChildCreated {
// Specifies the actor address
Address address = 1;
// Specifies the parent address
Address parent = 2;
// Specifies the started time
google.protobuf.Timestamp created_at = 3;
}
// ActorRestarted defines the actor restarted event
message ActorRestarted {
// Specifies the actor address
Address address = 1;
// Specifies the stop time
google.protobuf.Timestamp restarted_at = 2;
}
// NodeJoined defines the node joined event
message NodeJoined {
// Specifies the node address
string address = 1;
// Specifies the timestamp
google.protobuf.Timestamp timestamp = 2;
}
// NodeLeft defines the node left event
message NodeLeft {
// Specifies the node address
string address = 1;
// Specifies the timestamp
google.protobuf.Timestamp timestamp = 2;
}
// Terminated is used to notify watching actors
// of the shutdown of its child actor.
message Terminated {}
// PoisonPill is sent the stop an actor.
// It is enqueued as ordinary messages.
// It will be handled after messages that were already queued in the mailbox.
message PoisonPill {}
// PostStart is used when an actor has successfully started
message PostStart {}
// PreStart is used when an actor is about to start
message PreStart {}