Skip to content

Commit

Permalink
Update to latest dskit commit (#9546)
Browse files Browse the repository at this point in the history
Specifically, this pulls in grafana/dskit#591
which adds new `.Set()` and `.Add()` methods to cache interfaces and
clients.

Signed-off-by: Nick Pillitteri <[email protected]>
  • Loading branch information
56quarters authored Oct 7, 2024
1 parent e78254e commit 432a4f4
Show file tree
Hide file tree
Showing 13 changed files with 251 additions and 31 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/golang/snappy v0.0.4
github.com/google/gopacket v1.1.19
github.com/gorilla/mux v1.8.1
github.com/grafana/dskit v0.0.0-20241004235212-a711ce30731c
github.com/grafana/dskit v0.0.0-20241007163720-de20fd2fe818
github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/json-iterator/go v1.1.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1256,8 +1256,8 @@ github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc h1:PXZQA2WCxe85T
github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc/go.mod h1:AHHlOEv1+GGQ3ktHMlhuTUwo3zljV3QJbC0+8o2kn+4=
github.com/grafana/alerting v0.0.0-20240926144415-27f4e81b4b6b h1:UO4mv94pG1kzKCgBKh20TXdACBCAK2vYjV3Q2MlcpEQ=
github.com/grafana/alerting v0.0.0-20240926144415-27f4e81b4b6b/go.mod h1:GMLi6d09Xqo96fCVUjNk//rcjP5NKEdjOzfWIffD5r4=
github.com/grafana/dskit v0.0.0-20241004235212-a711ce30731c h1:AMJ+saiPDxwi2sDj/tPP+RMH6xF63Lrib0l2aLJuuDI=
github.com/grafana/dskit v0.0.0-20241004235212-a711ce30731c/go.mod h1:SPLNCARd4xdjCkue0O6hvuoveuS1dGJjDnfxYe405YQ=
github.com/grafana/dskit v0.0.0-20241007163720-de20fd2fe818 h1:VPMurXtl+ONN13d9ge1TGTJDBsJNr9Vb1pNQHpQ/aro=
github.com/grafana/dskit v0.0.0-20241007163720-de20fd2fe818/go.mod h1:SPLNCARd4xdjCkue0O6hvuoveuS1dGJjDnfxYe405YQ=
github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc h1:BW+LjKJDz0So5LI8UZfW5neWeKpSkWqhmGjQFzcFfLM=
github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc/go.mod h1:JVmqPBe8A/pZWwRoJW5ZjyALeY5OXMzPl7LrVXOdZAI=
github.com/grafana/franz-go v0.0.0-20241003081803-835b5cb1ddcf h1:g6lIXOJlt9LMbx9fUJ+2RoO155txAtpPmM/8mdFq/B0=
Expand Down
14 changes: 14 additions & 0 deletions pkg/storegateway/indexcache/remote_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,20 @@ func (c *mockedRemoteCacheClient) SetMultiAsync(data map[string][]byte, _ time.D
}
}

func (c *mockedRemoteCacheClient) Set(_ context.Context, key string, value []byte, _ time.Duration) error {
c.cache[key] = value
return nil
}

func (c *mockedRemoteCacheClient) Add(_ context.Context, key string, value []byte, _ time.Duration) error {
if _, ok := c.cache[key]; ok {
return cache.ErrNotStored
}

c.cache[key] = value
return nil
}

func (c *mockedRemoteCacheClient) Delete(_ context.Context, key string) error {
delete(c.cache, key)

Expand Down
13 changes: 13 additions & 0 deletions vendor/github.com/grafana/dskit/cache/cache.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 46 additions & 17 deletions vendor/github.com/grafana/dskit/cache/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions vendor/github.com/grafana/dskit/cache/compression.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions vendor/github.com/grafana/dskit/cache/lru.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 60 additions & 7 deletions vendor/github.com/grafana/dskit/cache/memcached_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions vendor/github.com/grafana/dskit/cache/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 432a4f4

Please sign in to comment.