Skip to content

Commit

Permalink
Migrating GetTablets
Browse files Browse the repository at this point in the history
  • Loading branch information
notfelineit committed Oct 23, 2023
1 parent b3f4202 commit 5450a53
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions go/vt/vtadmin/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,16 @@ func (c *Cluster) GetTablets(ctx context.Context) ([]*vtadminpb.Tablet, error) {
}

func (c *Cluster) getTablets(ctx context.Context) ([]*vtadminpb.Tablet, error) {
res, err := c.Vtctld.GetTablets(ctx, &vtctldatapb.GetTabletsRequest{})
tablets := make([]*vtadminpb.Tablet, len(res.Tablets))
for i, t := range res.Tablets {
tablets[i] = &vtadminpb.Tablet{
Cluster: c.ToProto(),
Tablet: t,
// TODO: Add serving state, return these results
}
}

rows, err := c.DB.ShowTablets(ctx)
if err != nil {
return nil, err
Expand Down

0 comments on commit 5450a53

Please sign in to comment.