Add describeInstancesResponse struct and update hostSetQuery struct

This commit is contained in:
Delaine Rogers committed 2026-08-18 13:33:08 -07:00
1 parent 163ec69771
commit f4406802cb
1 file changed
+13 -7
+13 -7
View File
@@ -32,6 +32,19 @@ type HostPlugin struct {
testCatalogStateOpts []awsCatalogPersistedStateOption
}
type hostSetQuery struct {
Id string
roleArn string
Input *ec2.DescribeInstancesInput
Output *ec2.DescribeInstancesOutput
OutputHosts []*pb.ListHostsResponseHost
}
type describeInstancesResponse struct {
hosts []hostSetQuery
errors []error // TODO: change to []*pb.HostPluginIssue
}
// Ensure that we are implementing HostPluginServiceServer
var _ pb.HostPluginServiceServer = (*HostPlugin)(nil)
@@ -495,13 +508,6 @@ func (p *HostPlugin) ListHosts(ctx context.Context, req *pb.ListHostsRequest) (*
}
// Build all the queries in advance.
type hostSetQuery struct {
Id string
Input *ec2.DescribeInstancesInput
Output *ec2.DescribeInstancesOutput
OutputHosts []*pb.ListHostsResponseHost
}
queries := make([]hostSetQuery, len(sets))
for i, set := range sets {
// Validate Id since we use it in output