ChangeState of the ingester, for use off of the loop() goroutine.
(ctx context.Context, state InstanceState)
| 350 | |
| 351 | // ChangeState of the ingester, for use off of the loop() goroutine. |
| 352 | func (i *Lifecycler) ChangeState(ctx context.Context, state InstanceState) error { |
| 353 | errCh := make(chan error) |
| 354 | fn := func() { |
| 355 | errCh <- i.changeState(ctx, state) |
| 356 | } |
| 357 | |
| 358 | if err := i.sendToLifecyclerLoop(fn); err != nil { |
| 359 | return err |
| 360 | } |
| 361 | return <-errCh |
| 362 | } |
| 363 | |
| 364 | func (i *Lifecycler) ChangeReadOnlyState(ctx context.Context, readOnly bool) error { |
| 365 | errCh := make(chan error) |