Skip to content

Commit 987235c

Browse files
committed
Merge 'develop' to 'mantasaudickas:feature/downstream-service-name'
2 parents bfae18a + 433dfca commit 987235c

File tree

732 files changed

+35576
-35706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

732 files changed

+35576
-35706
lines changed

.circleci/config.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,43 @@
1-
version: 2.1
1+
version: 2.1
22
orbs:
3-
queue: eddiewebb/queue@1.5.0
3+
queue: eddiewebb/queue@2.2.1
44
jobs:
55
build:
66
docker:
7-
- image: mijitt0m/ocelot-build:0.0.1
7+
- image: mijitt0m/ocelot-build:0.0.9
88
steps:
99
- checkout
10-
- run: make build
10+
- run: dotnet tool restore && dotnet cake
1111
release:
1212
docker:
13-
- image: mijitt0m/ocelot-build:0.0.1
13+
- image: mijitt0m/ocelot-build:0.0.9
1414
steps:
1515
- checkout
16-
- run: make release
16+
- run: dotnet tool restore && dotnet cake --target=Release
1717
workflows:
1818
version: 2
19-
master:
20-
jobs:
19+
main:
20+
jobs:
2121
- queue/block_workflow:
2222
time: "20"
23-
only-on-branch: master
24-
- release:
23+
only-on-branch: main
24+
- release:
2525
requires:
2626
- queue/block_workflow
2727
filters:
2828
branches:
29-
only: master
29+
only: main
30+
develop:
31+
jobs:
32+
- build:
33+
filters:
34+
branches:
35+
only: develop
3036
pr:
3137
jobs:
3238
- build:
3339
filters:
3440
branches:
3541
ignore:
36-
- master
42+
- main
43+
- develop

.config/dotnet-tools.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"cake.tool": {
6+
"version": "3.0.0",
7+
"commands": [
8+
"dotnet-cake"
9+
]
10+
},
11+
"coveralls.net": {
12+
"version": "4.0.1",
13+
"commands": [
14+
"csmacnz.Coveralls"
15+
]
16+
}
17+
}
18+
}

.dockerignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
*/*/bin
2-
*/*/obj
1+
*/*/bin
2+
*/*/obj
3+
artifacts/
4+
TestResults/
5+
tools/

.editorconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ root = true
44
end_of_line = lf
55
insert_final_newline = true
66

7-
[*.cs]
7+
[*.cs]
8+
end_of_line = lf
89
indent_style = space
910
indent_size = 4

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 2010
2+
*.txt -crlf
3+
4+
# 2020
5+
*.txt text eol=lf

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ ClientBin/
183183
*.dbmdl
184184
*.dbproj.schemaview
185185
*.pfx
186-
!idsrv3test.pfx
186+
!mycert.pfx
187187
*.publishsettings
188188
node_modules/
189189
orleans.codegen.cs

Makefile

Lines changed: 0 additions & 23 deletions
This file was deleted.

Ocelot.sln

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29613.14
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.32112.339
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5CFB79B7-C9DC-45A4-9A75-625D92471702}"
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3FA7C349-DBE8-4904-A2CE-015B8869CE6C}"
99
ProjectSection(SolutionItems) = preProject
1010
.dockerignore = .dockerignore
11+
.editorconfig = .editorconfig
1112
.gitignore = .gitignore
1213
build.cake = build.cake
1314
build.ps1 = build.ps1
@@ -43,15 +44,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Provider.Eureka", "s
4344
EndProject
4445
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Provider.Polly", "src\Ocelot.Provider.Polly\Ocelot.Provider.Polly.csproj", "{1F6E5DCF-8A2E-4E24-A25D-064362DE8D0E}"
4546
EndProject
46-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Provider.Rafty", "src\Ocelot.Provider.Rafty\Ocelot.Provider.Rafty.csproj", "{AC153C67-EF18-47E6-A230-F0D3CF5F0A98}"
47-
EndProject
4847
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Tracing.Butterfly", "src\Ocelot.Tracing.Butterfly\Ocelot.Tracing.Butterfly.csproj", "{6045E23D-669C-4F27-AF8E-8EEE6DB3557F}"
4948
EndProject
5049
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Provider.Kubernetes", "src\Ocelot.Provider.Kubernetes\Ocelot.Provider.Kubernetes.csproj", "{72C8E528-B4F5-45CE-8A06-CD3787364856}"
5150
EndProject
5251
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{8FA0CBA0-0338-48EB-B37F-83CA5022237C}"
5352
EndProject
54-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OcelotBasic", "samples\OcelotBasic\OcelotBasic.csproj", "{ED0B3A09-112B-4BA4-82D6-11569BC7A99B}"
53+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Samples.OcelotBasic.ApiGateway", "samples\OcelotBasic\Ocelot.Samples.OcelotBasic.ApiGateway.csproj", "{ED0B3A09-112B-4BA4-82D6-11569BC7A99B}"
5554
EndProject
5655
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdministrationApi", "samples\AdministrationApi\AdministrationApi.csproj", "{B180F8AE-2F8F-44F9-9E5D-FE65B84B742E}"
5756
EndProject
@@ -65,9 +64,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DownstreamService", "sample
6564
EndProject
6665
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "k8s", "k8s", "{4B706988-4817-43A8-ABE1-32A67998C2C8}"
6766
EndProject
68-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiGateway", "samples\OcelotKube\ApiGateway\ApiGateway.csproj", "{8500055B-2C51-4CF1-A6EE-F05BB3E9BF16}"
67+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Samples.OcelotKube.ApiGateway", "samples\OcelotKube\ApiGateway\Ocelot.Samples.OcelotKube.ApiGateway.csproj", "{8500055B-2C51-4CF1-A6EE-F05BB3E9BF16}"
6968
EndProject
70-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DownstreamService", "samples\OcelotKube\DownstreamService\DownstreamService.csproj", "{7B319B8C-8155-4779-BD93-5ABD05CA2AB6}"
69+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Samples.OcelotKube.DownstreamService", "samples\OcelotKube\DownstreamService\Ocelot.Samples.OcelotKube.DownstreamService.csproj", "{7B319B8C-8155-4779-BD93-5ABD05CA2AB6}"
7170
EndProject
7271
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "service-fabric", "service-fabric", "{B412628F-C325-47E1-A8D9-873DE04C8AF5}"
7372
EndProject
@@ -81,6 +80,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "basic", "basic", "{ED066001
8180
EndProject
8281
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "graphql", "graphql", "{C15CD120-5F8D-41DE-9B21-00E3EA77D6C1}"
8382
EndProject
83+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocelot.Tracing.OpenTracing", "src\Ocelot.Tracing.OpenTracing\Ocelot.Tracing.OpenTracing.csproj", "{11C622AD-8C0A-4CF4-811B-3DBB76550797}"
84+
EndProject
85+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "open-tracing", "open-tracing", "{731C6A8A-69ED-445C-A132-C638AA93F9C7}"
86+
EndProject
87+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OcelotOpenTracing", "samples\OcelotOpenTracing\OcelotOpenTracing.csproj", "{C9427E78-4281-4F59-A66E-17C0B66550E5}"
88+
EndProject
8489
Global
8590
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8691
Debug|Any CPU = Debug|Any CPU
@@ -131,10 +136,6 @@ Global
131136
{1F6E5DCF-8A2E-4E24-A25D-064362DE8D0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
132137
{1F6E5DCF-8A2E-4E24-A25D-064362DE8D0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
133138
{1F6E5DCF-8A2E-4E24-A25D-064362DE8D0E}.Release|Any CPU.Build.0 = Release|Any CPU
134-
{AC153C67-EF18-47E6-A230-F0D3CF5F0A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
135-
{AC153C67-EF18-47E6-A230-F0D3CF5F0A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
136-
{AC153C67-EF18-47E6-A230-F0D3CF5F0A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
137-
{AC153C67-EF18-47E6-A230-F0D3CF5F0A98}.Release|Any CPU.Build.0 = Release|Any CPU
138139
{6045E23D-669C-4F27-AF8E-8EEE6DB3557F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
139140
{6045E23D-669C-4F27-AF8E-8EEE6DB3557F}.Debug|Any CPU.Build.0 = Debug|Any CPU
140141
{6045E23D-669C-4F27-AF8E-8EEE6DB3557F}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -179,6 +180,14 @@ Global
179180
{33BE6D88-F188-4E60-83AC-3C4B94D24675}.Debug|Any CPU.Build.0 = Debug|Any CPU
180181
{33BE6D88-F188-4E60-83AC-3C4B94D24675}.Release|Any CPU.ActiveCfg = Release|Any CPU
181182
{33BE6D88-F188-4E60-83AC-3C4B94D24675}.Release|Any CPU.Build.0 = Release|Any CPU
183+
{11C622AD-8C0A-4CF4-811B-3DBB76550797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
184+
{11C622AD-8C0A-4CF4-811B-3DBB76550797}.Debug|Any CPU.Build.0 = Debug|Any CPU
185+
{11C622AD-8C0A-4CF4-811B-3DBB76550797}.Release|Any CPU.ActiveCfg = Release|Any CPU
186+
{11C622AD-8C0A-4CF4-811B-3DBB76550797}.Release|Any CPU.Build.0 = Release|Any CPU
187+
{C9427E78-4281-4F59-A66E-17C0B66550E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
188+
{C9427E78-4281-4F59-A66E-17C0B66550E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
189+
{C9427E78-4281-4F59-A66E-17C0B66550E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
190+
{C9427E78-4281-4F59-A66E-17C0B66550E5}.Release|Any CPU.Build.0 = Release|Any CPU
182191
EndGlobalSection
183192
GlobalSection(SolutionProperties) = preSolution
184193
HideSolutionNode = FALSE
@@ -195,7 +204,6 @@ Global
195204
{02F5AE4D-9C36-4E58-B7C6-012CBBDEFDE0} = {5CFB79B7-C9DC-45A4-9A75-625D92471702}
196205
{9BBD3586-145C-4FA0-91C5-9ED58287D753} = {5CFB79B7-C9DC-45A4-9A75-625D92471702}
197206
{1F6E5DCF-8A2E-4E24-A25D-064362DE8D0E} = {5CFB79B7-C9DC-45A4-9A75-625D92471702}
198-
{AC153C67-EF18-47E6-A230-F0D3CF5F0A98} = {5CFB79B7-C9DC-45A4-9A75-625D92471702}
199207
{6045E23D-669C-4F27-AF8E-8EEE6DB3557F} = {5CFB79B7-C9DC-45A4-9A75-625D92471702}
200208
{72C8E528-B4F5-45CE-8A06-CD3787364856} = {5CFB79B7-C9DC-45A4-9A75-625D92471702}
201209
{ED0B3A09-112B-4BA4-82D6-11569BC7A99B} = {ED066001-BAF7-4117-9884-DF591A56347D}
@@ -213,6 +221,9 @@ Global
213221
{1F1F324D-6EA4-4E63-A6A7-C6053F412F1A} = {8FA0CBA0-0338-48EB-B37F-83CA5022237C}
214222
{ED066001-BAF7-4117-9884-DF591A56347D} = {8FA0CBA0-0338-48EB-B37F-83CA5022237C}
215223
{C15CD120-5F8D-41DE-9B21-00E3EA77D6C1} = {8FA0CBA0-0338-48EB-B37F-83CA5022237C}
224+
{11C622AD-8C0A-4CF4-811B-3DBB76550797} = {5CFB79B7-C9DC-45A4-9A75-625D92471702}
225+
{731C6A8A-69ED-445C-A132-C638AA93F9C7} = {8FA0CBA0-0338-48EB-B37F-83CA5022237C}
226+
{C9427E78-4281-4F59-A66E-17C0B66550E5} = {731C6A8A-69ED-445C-A132-C638AA93F9C7}
216227
EndGlobalSection
217228
GlobalSection(ExtensibilityGlobals) = postSolution
218229
SolutionGuid = {21476EFF-778A-4F97-8A56-D1AF1CEC0C48}

README.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,21 @@
1-
[<img src="https://threemammals.com/images/ocelot_logo.png">](https://threemammals.com/ocelot)
1+
![Ocelot Logo](/images/ocelot_logo.png)
22

3-
[![CircleCI](https://circleci.com/gh/ThreeMammals/Ocelot/tree/master.svg?style=svg)](https://circleci.com/gh/ThreeMammals/Ocelot/tree/master)
3+
[![CircleCI](https://circleci.com/gh/ThreeMammals/Ocelot/tree/main.svg?style=svg)](https://circleci.com/gh/ThreeMammals/Ocelot/tree/main)
44

5-
[![Coverage Status](https://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg?branch=master)](https://coveralls.io/github/ThreeMammals/Ocelot?branch=master)
6-
7-
[Slack](https://threemammals.slack.com)
5+
[![Coverage Status](https://coveralls.io/repos/github/ThreeMammals/Ocelot/badge.svg)](https://coveralls.io/github/ThreeMammals/Ocelot)
86

97
# Ocelot
108

11-
Ocelot is a .NET API Gateway. This project is aimed at people using .NET running
12-
a micro services / service oriented architecture
9+
Ocelot is a .NET API Gateway. This project is aimed at people using .NET running a micro services / service oriented architecture
1310
that need a unified point of entry into their system. However it will work with anything that speaks HTTP and run on any platform that ASP.NET Core supports.
1411

15-
In particular I want easy integration with
16-
IdentityServer reference and bearer tokens.
12+
In particular I want easy integration with IdentityServer reference and bearer tokens.
1713

18-
We have been unable to find this in my current workplace
19-
without having to write our own Javascript middlewares
20-
to handle the IdentityServer reference tokens. We would
21-
rather use the IdentityServer code that already exists
22-
to do this.
14+
We have been unable to find this in my current workplace without having to write our own Javascript middlewares to handle the IdentityServer reference tokens. We would rather use the IdentityServer code that already exists to do this.
2315

2416
Ocelot is a bunch of middlewares in a specific order.
2517

26-
Ocelot manipulates the HttpRequest object into a state specified by its configuration until
27-
it reaches a request builder middleware where it creates a HttpRequestMessage object which is
28-
used to make a request to a downstream service. The middleware that makes the request is
29-
the last thing in the Ocelot pipeline. It does not call the next middleware.
30-
The response from the downstream service is retrieved as the requests goes back up the Ocelot pipeline.
31-
There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that
32-
is returned to the client. That is basically it with a bunch of other features!
18+
Ocelot manipulates the HttpRequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a HttpRequestMessage object which is used to make a request to a downstream service. The middleware that makes the request is the last thing in the Ocelot pipeline. It does not call the next middleware. The response from the downstream service is retrieved as the requests goes back up the Ocelot pipeline. There is a piece of middleware that maps the HttpResponseMessage onto the HttpResponse object and that is returned to the client. That is basically it with a bunch of other features!
3319

3420
## Features
3521

@@ -42,7 +28,7 @@ A quick list of Ocelot's capabilities for more information see the [documentatio
4228
* Kubernetes
4329
* WebSockets
4430
* Authentication
45-
* Authorisation
31+
* Authorization
4632
* Rate Limiting
4733
* Caching
4834
* Retry policies / QoS
@@ -55,7 +41,7 @@ A quick list of Ocelot's capabilities for more information see the [documentatio
5541

5642
## How to install
5743

58-
Ocelot is designed to work with ASP.NET Core only and it targets `netcoreapp3.1`.
44+
Ocelot is designed to work with ASP.NET and it targets `net7.0`.
5945

6046
Install Ocelot and it's dependencies using NuGet.
6147

@@ -81,18 +67,16 @@ We love to receive contributions from the community so please keep them coming :
8167

8268
Pull requests, issues and commentary welcome!
8369

84-
Please complete the relevant template for issues and PRs. Sometimes it's worth getting in touch with us to discuss changes
85-
before doing any work incase this is something we are already doing or it might not make sense. We can also give
86-
advice on the easiest way to do things :)
70+
Please complete the relevant template for issues and PRs. Sometimes it's worth getting in touch with us to discuss changes before doing any work incase this is something we are already doing or it might not make sense. We can also give advice on the easiest way to do things :)
8771

8872
Finally we mark all existing issues as help wanted, small, medium and large effort. If you want to contribute for the first time I suggest looking at a help wanted & small effort issue :)
8973

9074
## Donate
9175

92-
If you think this project is worth supporting financially please make a contribution using the button below!
76+
If you think this project is worth supporting financially please make a contribution using the button below! We use the money to run the https://threemammals.com website.
9377

9478
[![Support via PayPal](https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg)](https://www.paypal.me/ThreeMammals/)
9579

9680
## Things that are currently annoying me
9781

98-
[![](https://codescene.io/projects/697/status.svg) Get more details at **codescene.io**.](https://codescene.io/projects/697/jobs/latest-successful/results)
82+
[![](https://codescene.io/projects/697/status.svg) Get more details at **codescene.io**.](https://codescene.io/projects/697/jobs/latest-successful/results)

0 commit comments

Comments
 (0)