-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from dotnetcore/master
merge from origin
- Loading branch information
Showing
52 changed files
with
724 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#### Surging.Core.Log4net 0.4.8 December 17 2017 | ||
- Add logs based on log4net | ||
|
||
#### Surging.Core.Zookeeper 0.4.9 December 16 2017 | ||
- Fixed using zookeeper registry did not register fault tolerance rules | ||
|
||
#### 0.4.8 December 10 2017 | ||
- First public release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
surging is based on .net core language high-performance distributed microservices framework, | ||
Clients can enable caching to intercept client calls to the server,The following example enables caching | ||
|
||
Code Examples | ||
============= | ||
|
||
Clients enable caching through the following configuration: | ||
```c# | ||
{ | ||
"CachingSettings": [ | ||
{ | ||
"Id": "SurgingCache", | ||
"Class": "Surging.Core.Caching.RedisCache.RedisContext,Surging.Core.Caching", | ||
"Properties": [ | ||
{ | ||
"Name": "appRuleFile", | ||
"Ref": "rule" | ||
}, | ||
{ | ||
"Name": "dataContextPool", | ||
"Ref": "ddls_sample", | ||
"Maps": [ | ||
{ | ||
"Name": "Redis", | ||
"Properties": [ | ||
{ | ||
"value": "127.0.0.1:6379::1" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "defaultExpireTime", | ||
"value": "120" | ||
}, | ||
{ | ||
"Name": "connectTimeout", | ||
"Value": "120" | ||
}, | ||
{ | ||
"Name": "minSize", | ||
"Value": "1" | ||
}, | ||
{ | ||
"Name": "maxSize", | ||
"Value": "10" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
``` | ||
* The configuration section "CachingSettings" property "Id" is the ICacheProvider instance ID | ||
* Configuration section "Maps" property "Name" is what cache | ||
* Configuration section "Maps" property Properties is a cache server list | ||
* Configuration section "Properties" property "defaultExpireTime" value of 120 is the cache default lost effective time is 120 seconds | ||
* Configuration section "Properties" property "connectTimeout" value of 120 is connection cache server Timeout time is 120 seconds | ||
* Configuration section "Properties" property "minSize" value of 1 is the minimum thread pool is 1 | ||
* Configuration section "Properties" property "maxSize" value of 10 is the maximum thread pool is 10 | ||
|
||
Open the cache can be In the interface method attribute "Command" property RequestCacheEnabled is set to true: | ||
```c# | ||
[ServiceBundle("api/{Service}")] | ||
public interface IUserService :Surging.Core.CPlatform.Ioc.IServiceKey | ||
{ | ||
[Command(RequestCacheEnabled =true)] | ||
Task<string> SayHello(string username); | ||
} | ||
``` | ||
## Next steps | ||
|
||
* [How to cache interception] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/Surging.Core/Surging.Core.CPlatform/Configurations/SurgingServerOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using Surging.Core.CPlatform.Support; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Surging.Core.CPlatform.Configurations | ||
{ | ||
public class SurgingServerOptions: ServiceCommand | ||
{ | ||
public string Ip { get; set; } | ||
|
||
public int Port { get; set; } | ||
|
||
public string token { get; set; } = "True"; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Surging.Core/Surging.Core.CPlatform/Messages/MessagePackTransportMessageType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using Surging.Core.CPlatform.Messages; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Surging.Core.CPlatform.Messages | ||
{ | ||
public class MessagePackTransportMessageType | ||
{ | ||
public static string remoteInvokeResultMessageTypeName= typeof(RemoteInvokeResultMessage).FullName; | ||
|
||
public static string remoteInvokeMessageTypeName = typeof(RemoteInvokeMessage).FullName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.