Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ import (
gitserverpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/gitserver/v1"
healthcheckconfigv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/healthcheckconfig/v1"
integrationpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/integration/v1"
inventoryv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/inventory/v1"
joinv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/join/v1"
kubeproto "github.com/gravitational/teleport/api/gen/proto/go/teleport/kube/v1"
kubewaitingcontainerpb "github.com/gravitational/teleport/api/gen/proto/go/teleport/kubewaitingcontainer/v1"
Expand Down Expand Up @@ -926,6 +927,11 @@ func (c *Client) WorkloadIdentityServiceClient() machineidv1pb.WorkloadIdentityS
return machineidv1pb.NewWorkloadIdentityServiceClient(c.conn)
}

// InventoryServiceClient returns an unadorned client for the inventory service.
func (c *Client) InventoryServiceClient() inventoryv1.InventoryServiceClient {
return inventoryv1.NewInventoryServiceClient(c.conn)
}

// NotificationServiceClient returns a notification service client that can be used to fetch notifications.
func (c *Client) NotificationServiceClient() notificationsv1pb.NotificationServiceClient {
return notificationsv1pb.NewNotificationServiceClient(c.conn)
Expand Down
10 changes: 10 additions & 0 deletions api/client/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/gravitational/trace"

"github.com/gravitational/teleport/api/client/proto"
inventoryv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/inventory/v1"
"github.com/gravitational/teleport/api/internalutils/stream"
"github.com/gravitational/teleport/api/types"
)
Expand Down Expand Up @@ -247,6 +248,15 @@ func (c *Client) GetInstances(ctx context.Context, filter types.InstanceFilter)
}, cancel)
}

// ListUnifiedInstances returns a paginated list of unified instances (teleport instances and bot instances).
func (c *Client) ListUnifiedInstances(ctx context.Context, req *inventoryv1.ListUnifiedInstancesRequest) (*inventoryv1.ListUnifiedInstancesResponse, error) {
rsp, err := c.InventoryServiceClient().ListUnifiedInstances(ctx, req)
if err != nil {
return nil, trace.Wrap(err)
}
return rsp, nil
}

func newDownstreamInventoryControlStream(stream proto.AuthService_InventoryControlStreamClient, cancel context.CancelFunc) DownstreamInventoryControlStream {
ics := &downstreamICS{
sendC: make(chan upstreamSend),
Expand Down
Loading
Loading