MCPcopy
hub / github.com/grafana/tempo / LiveStoreConsumerGroupID

Function LiveStoreConsumerGroupID

pkg/ingest/util.go:43–52  ·  view source on GitHub ↗
(instanceID string)

Source from the content-addressed store, hash-verified

41}
42
43func LiveStoreConsumerGroupID(instanceID string) (string, error) {
44 match := ingesterIDRegexp.FindStringSubmatch(instanceID)
45 if len(match) == 0 {
46 return "", fmt.Errorf("instance ID %s doesn't match regular expression %q", instanceID, ingesterIDRegexp.String())
47 }
48
49 // Extract everything before the numeric suffix
50 prefixEnd := len(instanceID) - len(match[0])
51 return instanceID[:prefixEnd], nil
52}
53
54// It retry until Kafka broker is ready
55func WaitForKafkaBroker(ctx context.Context, c *kgo.Client, l log.Logger) error {

Callers 1

NewFunction · 0.92

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected