GithubHelp home page GithubHelp logo

apache / shenyu-client-dotnet Goto Github PK

View Code? Open in Web Editor NEW
9.0 30.0 6.0 95 KB

Apache ShenYu Client SDK for donet.

Home Page: https://shenyu.apache.org/

License: Apache License 2.0

C# 100.00%
sdk shenyu

shenyu-client-dotnet's Introduction

ShenYu .NET client

build codecov.io

ShenYu .NET client can help you register your ASP.NET Core applications into ShenYu, similar with Java client. It supports below registration type,

  • http registration
  • zookeeper registration
  • nacos registration
  • consul registration
  • etcd registration

Getting Started

Please visit related document to start to start.

For http registration, please visit HTTP Registration.

For zookeeper registration, please visit Zookeeper Registration.

For consul registration, please visit Consul Registration.

For nacos registration, please visit Nacos Registration.

For etcd registration, please visit Etcd Registration.

Attributes

You can use ShenyuClient attribute to register your APIs.

e.g. add ShenyuClient attribute in class as route prefix.

[ShenyuClient("/test/**")]
public class TestController {
  ...
}

e.g. add ShenyuClient attribute in method as route path. The final route path will be /test/hello for this endpoint.

[ShenyuClient("/test")]
public class TestController {
    [ShenyuClient("hello")]
    public IEnumerable<WeatherForecast> GetTest()
    {
        ...
    }
    ...
}

shenyu-client-dotnet's People

Contributors

bingtianyiyan avatar dengliming avatar dependabot[bot] avatar hgaol avatar stulzq avatar tuohai666 avatar yu199195 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shenyu-client-dotnet's Issues

代理接口访问不到

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

netcore程序已经注册进shenyu,界面上已经显示。使用postman请求代理接口不通。本地启动是可以用本机ip或者localhost访问接口, 不通过代理访问接口。当初以为是docker容器没开放访问本机权限,下载java程序到本地启动,netcore程序改成访问本地java程序,正常注册进shenyu,不过再次尝试使用postman请求代理接口不通

Expected Behavior

能够访问代理后的接口,想请问下是设置问题还是操作不当引起

Steps To Reproduce

No response

Environment

ShenYu version(s):最新master分支

Debug logs

现象:接口http://127.0.0.1:9195/dotnet2/template/hello 访问不通

shenyu界面:
1660105948(1)

netcore启动:localhost和本机ip都是可以正常直接访问相应接口
netcore配置:
"Shenyu": {
"Register": {
"ServerList": "http://127.0.0.1:9095",
"RegisterType": "http",
"Props": {
"UserName": "admin",
"Password": "123456"
}
},
"Client": {
"AppName": "dotnet-example2",
"ContextPath": "/dotnet2",
"IsFull": false,
"ClientType": "http"
}
}

java程序:
1660105981(1)

Anything else?

No response

[Task] Add Unit Test for Shenyu dotnet client

Description

Add Unit Test, welcome to contribute if you're interested~
You can let me know and I'll create sub ISSUE for specific UT and linked to this issue.

Task List

No response

[Task] Add CI for building, testing, license checking and codeQL check

Description

Add CI for building, testing, license checking and codeQL check. Will add code coverage and integrated test ci in future PR.

Task List

  1. add ci for building for both .net5 and 6, and for win, mac and linux
  2. add license checker when PR and push to main
  3. add code QL
  4. add test CI and add only one UT for this time to check if it works well.

[Question] It is recommended to modify the support for .NET Framework 4.6.1 and upgrade the supported version of ASP.NET Core

Question

ASP.NET Core >= 5 no longer supports .NET Framework, Only run .NET Core. The new ASP.NET Core brings many feature changes, especially 3.1->5.0, if the multi-target framework is used to support it, it will complicate the code and increase the maintenance cost, and ASP.NET Core <= 3.1 is already an older version.

If you want to support .NET Framework I recommend maintaining a separate project (Library)

Then upgrade the supported version of the class library to .NET 5.0, 6.0

I can get the job done if the suggestion is taken.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.