Skip to content

Commit

Permalink
Ensure Proxy uses cache for periodic operations (#20152)
Browse files Browse the repository at this point in the history
Closes #20140
  • Loading branch information
rosstimothy committed Jan 12, 2023
1 parent 15a00d6 commit 002c393
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/reversetunnel/rc_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (w *RemoteClusterTunnelManager) Run(ctx context.Context) {
func (w *RemoteClusterTunnelManager) Sync(ctx context.Context) error {
// Fetch desired reverse tunnels and convert them to a set of
// remoteClusterKeys.
wantTunnels, err := w.cfg.AuthClient.GetReverseTunnels(ctx)
wantTunnels, err := w.cfg.AccessPoint.GetReverseTunnels(ctx)
if err != nil {
return trace.Wrap(err)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/reversetunnel/rc_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestRemoteClusterTunnelManagerSync(t *testing.T) {
ctx := context.Background()
for _, tt := range tests {
t.Run(tt.desc, func(t *testing.T) {
w.cfg.AuthClient = mockAuthClient{
w.cfg.AccessPoint = mockAuthClient{
reverseTunnels: tt.reverseTunnels,
reverseTunnelsErr: tt.reverseTunnelsErr,
}
Expand Down
2 changes: 1 addition & 1 deletion lib/reversetunnel/srv.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func (s *server) periodicFunctions() {

connectedRemoteClusters := s.getRemoteClusters()

remoteClusters, err := s.localAuthClient.GetRemoteClusters()
remoteClusters, err := s.localAccessPoint.GetRemoteClusters()
if err != nil {
s.log.WithError(err).Warn("Failed to get remote clusters")
}
Expand Down

0 comments on commit 002c393

Please sign in to comment.