microsoft / microsoft/aspire

Introduction of Microsoft.Extensions.ServiceRegistration.* packages

Open
#3,987 4 comments 0 reactions 0 assignees View on GitHub
area-service-discovery
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

To facilitate a rich eco system which provides developers with a large amount of flexibility we should be releasing a service registration packages with the key ones being.
- Microsoft.Extensions.ServiceRegistration.Abstraction provides an interface for application to register themselves
- Microsoft.Extensions.ServiceRegistration.Aspire allows for applications to register with Aspire and provides the AddAspireRegistry method

A potential usage would be as follows:

```C#
var builder = DistributedApplication.CreateBuilder(args).**AddAspireRegistry()**;

var cache = builder.AddRedis("cache");

var apiservice = builder.AddProject("apiservice");

builder.AddProject("webfrontend")
.WithReference(cache)
.WithReference(apiservice);

builder.Build()**.RegisterToRegistry()**.Run();
```

With this approach we can easily use aspire registry for local development & switch to alternative in production ie Kubernetes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.