(state InstanceState, tokenCount int)
| 159 | } |
| 160 | |
| 161 | func NewInstanceRegisterDelegate(state InstanceState, tokenCount int) InstanceRegisterDelegate { |
| 162 | return InstanceRegisterDelegate{ |
| 163 | registerState: state, |
| 164 | tokenCount: tokenCount, |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | func (d InstanceRegisterDelegate) OnRingInstanceRegister(l *BasicLifecycler, ringDesc Desc, instanceExists bool, _ string, instanceDesc InstanceDesc) (InstanceState, Tokens) { |
| 169 | // Keep the existing tokens if any, otherwise start with a clean situation. |
no outgoing calls