support register client via zookeeper (#9)

10 files changed
tree: 64bdaa54afc5705be9363dae26afa88b27e6e758
  1. .github/
  2. client/
  3. examples/
  4. .asf.yaml
  5. .gitignore
  6. DISCLAIMER
  7. global.json
  8. LICENSE
  9. NOTICE
  10. README.md
  11. ShenyuClient.sln
README.md

Shenyu .NET client

Getting Started

ASP.NET Core project

For ASP.NET Core project, we can refer to the example code at examples/AspNetCoreExample. What you need to do is quite simple and straightforward.

First, add the Shenyu ASP.NET Core dependency into project.

dotnet add package <todo>

Then, in Startup.ConfigureServices method, add the ShenyuRegister service.

public void ConfigureServices(IServiceCollection services)
{
    ...
    services.AddShenyuRegister(this.Configuration);
    ...
}

Finnaly, set your Shenyu configurations in appsettings.json.

{
    "Shenyu": {
        "Register": {
            "ServerList": "http://localhost:9095",
            "UserName": "<your_admin_user>",
            "Password": "<your_admin_password>"
        },
        "Client": {
            "AppName": "dotnet-example",
            "ContextPath": "/dotnet",
            "IsFull": false,
            "ClientType": "http"
        }
    }
}

That's all! After finished above steps, you can just start your project and you can visit shenyu-admin portal to see the APIs have been registered in Shenyu.