Skip to content

Consider providing an external endpoint resource #2311

@paulomorgado

Description

@paulomorgado

For external endpoint resources, I'm using this code:

public class ResourceWithServiceDiscovery : IResourceWithServiceDiscovery
{
    public required string Name { get; init; }

    public required ResourceMetadataCollection Annotations { get; init; }
}

And using it like this:

var remoteResource = new ResourceWithServiceDiscovery
{
    Name = "someremoteresource",
    Annotations = [
        new AllocatedEndpointAnnotation(
            "http",
            ProtocolType.Tcp,
            remoteHubConfig.GetValue<string>("Address")!,
            remoteHubConfig.GetValue<int>("Port"),
            remoteHubConfig.GetValue<string>("Scheme")!)
    ]
};

It would be nice to have something like this built in and showing up in the dashboard.

Metadata

Metadata

Labels

area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions