Rename peer cluster cache

This commit is contained in:
Jeff Mitchell 2017-05-24 21:10:32 -04:00
parent 948af0a12b
commit 3d7db4248f
2 changed files with 3 additions and 3 deletions

View File

@ -319,7 +319,7 @@ type Core struct {
// Lock for the cluster leader values
clusterLeaderParamsLock sync.RWMutex
// Info on cluster members
peerClusterAddrsCache *cache.Cache
clusterPeerClusterAddrsCache *cache.Cache
// The grpc Server that handles server RPC calls
rpcServer *grpc.Server
// The context for the client
@ -447,7 +447,7 @@ func NewCore(conf *CoreConfig) (*Core, error) {
clusterName: conf.ClusterName,
clusterListenerShutdownCh: make(chan struct{}),
clusterListenerShutdownSuccessCh: make(chan struct{}),
peerClusterAddrsCache: cache.New(3*heartbeatInterval, time.Second),
clusterPeerClusterAddrsCache: cache.New(3*heartbeatInterval, time.Second),
enableMlock: !conf.DisableMlock,
}

View File

@ -364,7 +364,7 @@ func (s *forwardedRequestRPCServer) ForwardRequest(ctx context.Context, freq *fo
func (s *forwardedRequestRPCServer) Echo(ctx context.Context, in *EchoRequest) (*EchoReply, error) {
if in.ClusterAddr != "" {
s.core.peerClusterAddrsCache.Set(in.ClusterAddr, nil, 0)
s.core.clusterPeerClusterAddrsCache.Set(in.ClusterAddr, nil, 0)
}
return &EchoReply{
Message: "pong",