(ctx context.Context, id string)
| 94 | } |
| 95 | |
| 96 | func (r *Ring) forget(ctx context.Context, id string) error { |
| 97 | unregister := func(in any) (out any, retry bool, err error) { |
| 98 | if in == nil { |
| 99 | return nil, false, fmt.Errorf("found empty ring when trying to unregister") |
| 100 | } |
| 101 | |
| 102 | ringDesc := in.(*Desc) |
| 103 | ringDesc.RemoveIngester(id) |
| 104 | return ringDesc, true, nil |
| 105 | } |
| 106 | return r.KVClient.CAS(ctx, r.key, unregister) |
| 107 | } |
| 108 | |
| 109 | type ingesterDesc struct { |
| 110 | ID string `json:"id"` |
no test coverage detected