IsRegistered returns whether the instance is currently registered within the ring.
()
| 197 | |
| 198 | // IsRegistered returns whether the instance is currently registered within the ring. |
| 199 | func (l *BasicLifecycler) IsRegistered() bool { |
| 200 | l.currState.RLock() |
| 201 | defer l.currState.RUnlock() |
| 202 | |
| 203 | return l.currInstanceDesc != nil |
| 204 | } |
| 205 | |
| 206 | func (l *BasicLifecycler) ChangeState(ctx context.Context, state InstanceState) error { |
| 207 | return l.run(func() error { |
no outgoing calls