Skip to content

Commit 6c38b0a

Browse files
committed
sm: cycle keys
1 parent 5ea2a4f commit 6c38b0a

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

model/stream_model.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,37 +156,38 @@ func (self StreamHop) Path() connect.TransferPath {
156156
// meaning if there is no new activity, they will be cleared
157157
// stream key -> stream id
158158
// stream key -> set of contract id
159-
// client id -> set of active stream pairs (from, to, streamid)
160-
// client id counter
161-
// event(client id) active streams changed
159+
// client id -> set of active stream hops
160+
// client id -> event id counter
161+
// event(client id) active streams changed event
162162
// contract id -> stream key
163+
// contract id -> stream id
163164

164165
func streamIdKey(streamKey []byte) string {
165-
return fmt.Sprintf("{%s}s_sk_sid", streamKey)
166+
return fmt.Sprintf("{%s}s2_sk_sid", streamKey)
166167
}
167168

168169
func streamContractsKey(streamKey []byte) string {
169-
return fmt.Sprintf("{%s}s_sk_cs", streamKey)
170+
return fmt.Sprintf("{%s}s2_sk_cs", streamKey)
170171
}
171172

172173
func clientStreamHopsKey(clientId server.Id) string {
173-
return fmt.Sprintf("{%s}s_c_hops", clientId)
174+
return fmt.Sprintf("{%s}s2_c_hops", clientId)
174175
}
175176

176177
func clientEventIdKey(clientId server.Id) string {
177-
return fmt.Sprintf("{%s}s_c_eid", clientId)
178+
return fmt.Sprintf("{%s}s2_c_eid", clientId)
178179
}
179180

180181
func clientStreamHopEvents(clientId server.Id) string {
181-
return fmt.Sprintf("{%s}s_c_events", clientId)
182+
return fmt.Sprintf("{%s}s2_c_events", clientId)
182183
}
183184

184185
func contractStreamKey(contractId server.Id) string {
185-
return fmt.Sprintf("{%s}s_ct_sk", contractId)
186+
return fmt.Sprintf("{%s}s2_ct_sk", contractId)
186187
}
187188

188189
func contractStreamId(contractId server.Id) string {
189-
return fmt.Sprintf("{%s}s_ct_sid", contractId)
190+
return fmt.Sprintf("{%s}s2_ct_sid", contractId)
190191
}
191192

192193
// returns a stream id to use for the contract

0 commit comments

Comments
 (0)