Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Oct 31, 2023
1 parent 053db2d commit e2cc07e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions flow/cmd/peer_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ func (h *FlowRequestHandler) getPoolForPGPeer(ctx context.Context, peerName stri
connStr := utils.GetPGConnectionString(&pgPeerConfig)
peerPool, err := pgxpool.New(ctx, connStr)
if err != nil {
return nil, unmarshalErr
return nil, "", err
}
return peerPool, nil
return peerPool, pgPeerConfig.User, nil
}

func (h *FlowRequestHandler) GetSchemas(
ctx context.Context,
req *protos.PostgresPeerActivityInfoRequest,
) (*protos.PeerSchemasResponse, error) {
peerPool, err := h.getPoolForPGPeer(ctx, req.PeerName)
peerPool, _, err := h.getPoolForPGPeer(ctx, req.PeerName)
if err != nil {
return &protos.PeerSchemasResponse{Schemas: nil}, err
}
Expand Down Expand Up @@ -67,7 +67,7 @@ func (h *FlowRequestHandler) GetTablesInSchema(
ctx context.Context,
req *protos.SchemaTablesRequest,
) (*protos.SchemaTablesResponse, error) {
peerPool, err := h.getPoolForPGPeer(ctx, req.PeerName)
peerPool, _, err := h.getPoolForPGPeer(ctx, req.PeerName)
if err != nil {
return &protos.SchemaTablesResponse{Tables: nil}, err
}
Expand Down Expand Up @@ -98,7 +98,7 @@ func (h *FlowRequestHandler) GetColumns(
ctx context.Context,
req *protos.TableColumnsRequest,
) (*protos.TableColumnsResponse, error) {
peerPool, err := h.getPoolForPGPeer(ctx, req.PeerName)
peerPool, _, err := h.getPoolForPGPeer(ctx, req.PeerName)
if err != nil {
return &protos.TableColumnsResponse{Columns: nil}, err
}
Expand Down

0 comments on commit e2cc07e

Please sign in to comment.