MM-21357: Use typed constants ClusterEvent (#17920)
* MM-21357: Use typed constants ClusterEvent Use typed constants for: - model.ClusterEvent https://mattermost.atlassian.net/browse/MM-21357 ```release-note Use typed constant for model.ClusterEvent ``` * trigger CI ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
Claudio Costa
родитель
9ae45d55d9
Коммит
623f8dc9af
6
services/cache/lru.go
поставляемый
6
services/cache/lru.go
поставляемый
@@ -24,7 +24,7 @@ type LRU struct {
|
||||
items map[string]*list.Element
|
||||
defaultExpiry time.Duration
|
||||
name string
|
||||
invalidateClusterEvent string
|
||||
invalidateClusterEvent model.ClusterEvent
|
||||
}
|
||||
|
||||
// LRUOptions contains options for initializing LRU cache
|
||||
@@ -32,7 +32,7 @@ type LRUOptions struct {
|
||||
Name string
|
||||
Size int
|
||||
DefaultExpiry time.Duration
|
||||
InvalidateClusterEvent string
|
||||
InvalidateClusterEvent model.ClusterEvent
|
||||
// StripedBuckets is used only by LRUStriped and shouldn't be greater than the number
|
||||
// of CPUs available on the machine running this cache.
|
||||
StripedBuckets int
|
||||
@@ -128,7 +128,7 @@ func (l *LRU) Len() (int, error) {
|
||||
}
|
||||
|
||||
// GetInvalidateClusterEvent returns the cluster event configured when this cache was created.
|
||||
func (l *LRU) GetInvalidateClusterEvent() string {
|
||||
func (l *LRU) GetInvalidateClusterEvent() model.ClusterEvent {
|
||||
return l.invalidateClusterEvent
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user