mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 20:07:38 +03:00
shared: Add SetHealthCheck to interface
This commit is contained in:
parent
11ffb962ae
commit
72ff654ee0
2 changed files with 16 additions and 3 deletions
|
@ -24,6 +24,8 @@ type Cache[K comparable, V any] interface {
|
|||
// Lifetime 0 means "forever".
|
||||
SetLifetime(lifetime time.Duration)
|
||||
|
||||
SetHealthCheck(healthCheck HealthCheckCallback[K, V])
|
||||
|
||||
// SetOnEvict sets the OnEvict callback function.
|
||||
// The onEvict function is called for each evicted lru entry.
|
||||
SetOnEvict(onEvict OnEvictCallback[K, V])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue