[#428] client: Hide client cache behind interface in dependent packages

Replace usage of `cache.ClientCache` type with interface with similar
signature. This will further allow overloading clients without affecting the
logic of dependent packages.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-03-23 21:40:36 +03:00 committed by Leonard Lyubich
parent f25253738a
commit 106884fc40
13 changed files with 65 additions and 49 deletions

View file

@ -21,8 +21,10 @@ import (
type (
ClientCache struct {
log *zap.Logger
cache *cache.ClientCache
key *ecdsa.PrivateKey
cache interface {
Get(string) (client.Client, error)
}
key *ecdsa.PrivateKey
sgTimeout, headTimeout, rangeTimeout time.Duration
}