github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/cluster/cluster.proto (about) 1 syntax = "proto3"; 2 package cluster; 3 option go_package = "/github.com/asynkron/protoactor-go/cluster"; 4 import "actor.proto"; 5 6 //request response call from Identity actor sent to each member 7 //asking what activations they hold that belong to the requester 8 message IdentityHandoverRequest { 9 Topology current_topology = 1; 10 string address = 2; 11 // If the requester passes a delta topology, only return activations which would not be assigned to the member 12 // in the previous topology. 13 Topology delta_topology = 3; 14 message Topology{ 15 uint64 topology_hash = 1; 16 repeated Member members = 3; 17 } 18 } 19 20 message IdentityHandover { 21 repeated Activation actors = 1; 22 int32 chunk_id = 2; 23 bool final = 3; 24 uint64 topology_hash = 4; 25 int32 skipped = 5; // Total number of activations skipped 26 int32 sent = 6; // Total number of activations sent 27 } 28 29 message RemoteIdentityHandover { 30 PackedActivations actors = 1; 31 int32 chunk_id = 2; 32 bool final = 3; 33 uint64 topology_hash = 4; 34 int32 skipped = 5; 35 int32 sent = 6; 36 } 37 38 message PackedActivations{ 39 string address = 1; 40 repeated Kind actors = 2; 41 message Kind{ 42 string name = 1; 43 repeated Activation activations = 2; 44 } 45 message Activation{ 46 string identity = 1; 47 string activation_id = 2; 48 } 49 } 50 51 message IdentityHandoverAck { 52 int32 chunk_id = 1; 53 uint64 topology_hash = 2; 54 State processing_state = 3; 55 enum State { 56 processed = 0; 57 incorrect_topology = 1; 58 } 59 } 60 61 message ClusterIdentity{ 62 string identity = 1; 63 string kind = 2; 64 } 65 66 message Activation { 67 actor.PID pid = 1; 68 ClusterIdentity cluster_identity = 2; 69 } 70 71 // Started terminating, not yet removed from IIdentityLookup 72 message ActivationTerminating { 73 actor.PID pid = 1; 74 ClusterIdentity cluster_identity = 2; 75 } 76 77 // Terminated, removed from lookup 78 message ActivationTerminated { 79 actor.PID pid = 1; 80 ClusterIdentity cluster_identity = 2; 81 } 82 83 message ActivationRequest { 84 ClusterIdentity cluster_identity = 1; 85 string request_id = 2; 86 uint64 topology_hash = 3; 87 } 88 89 message ProxyActivationRequest { 90 ClusterIdentity cluster_identity = 1; 91 actor.PID replaced_activation = 2; 92 } 93 94 message ActivationResponse { 95 actor.PID pid = 1; 96 bool failed = 2; 97 uint64 topology_hash = 3; 98 } 99 100 message ReadyForRebalance { 101 uint64 topology_hash = 1; 102 } 103 message RebalanceCompleted { 104 uint64 topology_hash = 1; 105 } 106 107 message Member { 108 string host = 1; 109 int32 port = 2; 110 string id = 3; 111 repeated string kinds = 4; 112 } 113 114 message ClusterTopology { 115 uint64 topology_hash = 1; 116 repeated Member members = 2; 117 repeated Member joined = 3; 118 repeated Member left = 4; 119 repeated string blocked = 5; 120 } 121 122 message ClusterTopologyNotification { 123 string member_id = 1; 124 uint32 topology_hash = 2; 125 string leader_id = 3; 126 } 127 128 message MemberHeartbeat { 129 ActorStatistics actor_statistics = 1; 130 } 131 132 message ActorStatistics { 133 map<string, int64> actor_count = 1; 134 } 135 136 137 138 139 //keys to implement initially 140 //topology - value is repeated members, this can replace ClusterTopologyNotification, as it would be the same, but better 141 //heartbeat - value is unit, or sender timestamp? 142 //leader - value is leader member id