MCPcopy Create free account
hub / github.com/cortexproject/cortex / forget

Method forget

pkg/ring/http.go:96–107  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

94}
95
96func (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
109type ingesterDesc struct {
110 ID string `json:"id"`

Callers 1

ServeHTTPMethod · 0.95

Calls 2

RemoveIngesterMethod · 0.80
CASMethod · 0.65

Tested by

no test coverage detected