56
logger log.Logger,
57
connectionCloseDelay dynamicconfig.DurationPropertyFn,
59
>
conns := &sync.Map{}
60
>
61
>
c := &connectionPoolImpl[C]{
62
>
conns: conns,
63
>
historyServiceResolver: historyServiceResolver,
64
>
rpcFactory: rpcFactory,
65
>
clientCtor: clientCtor,
66
>
logger: logger,
67
>
connectionCloseDelay: connectionCloseDelay,
68
>
}
69
>
70
>
// Close cached conns whose host leaves the membership ring.
71
>
c.watcher = goro.NewHandle(context.Background()).Go(c.watchMembership)
72
>
return c
73
>
}
74
75
// Close stops the watcher and closes all pooled connections.