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

Function mockDeletionMarkJSON

pkg/compactor/compactor_test.go:1713–1726  ·  view source on GitHub ↗
(id string, deletionTime time.Time)

Source from the content-addressed store, hash-verified

1711}
1712
1713func mockDeletionMarkJSON(id string, deletionTime time.Time) string {
1714 meta := metadata.DeletionMark{
1715 Version: metadata.DeletionMarkVersion1,
1716 ID: ulid.MustParse(id),
1717 DeletionTime: deletionTime.Unix(),
1718 }
1719
1720 content, err := json.Marshal(meta)
1721 if err != nil {
1722 panic("failed to marshal mocked block deletion mark")
1723 }
1724
1725 return string(content)
1726}
1727
1728func mockBlockMetaJSONWithTime(id string, orgID string, minTime int64, maxTime int64) string {
1729 meta := metadata.Meta{

Calls 1

MarshalMethod · 0.45

Tested by

no test coverage detected