-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StackExchange.Redis integration #130
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7ef3464
wip
dd-caleb 188376e
use explicity type parameters
dd-caleb 67cbd0a
remove log line
dd-caleb 0e27f65
add async, span tagging
dd-caleb 9488654
add integration test for redis
dd-caleb f8a6206
add redis install script
dd-caleb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" | ||
|
||
$tmp = [System.IO.Path]::GetTempPath() | ||
$installerUrl = "https://github.com/MicrosoftArchive/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.msi" | ||
$installerPath = Join-Path $tmp "install-redis.msi" | ||
$installerLog = Join-Path $tmp 'install-redis.log' | ||
|
||
if (Test-Path "C:\Program Files\Redis\redis-server.exe") { | ||
Write-Output "redis is already installed" | ||
Exit 0; | ||
} | ||
|
||
if (-not (Test-Path $installerPath)) { | ||
Write-Output "downloading redis to $installerPath" | ||
(New-Object Net.WebClient).DownloadFile($installerUrl, $installerPath) | ||
} | ||
|
||
Write-Output "installing redis" | ||
Start-Process "msiexec.exe" -ArgumentList "/i",$installerPath,"/qn","/norestart","/L",$installerLog -Wait -NoNewWindow | ||
Get-Content $installerLog |
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,19 @@ | ||
using System; | ||
using StackExchange.Redis; | ||
|
||
namespace Samples.RedisCore | ||
{ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
var redis = ConnectionMultiplexer.Connect("localhost"); | ||
for (var i = 0; i < 100; i++) | ||
{ | ||
redis.GetDatabase().StringSet($"KEY-{i}", $"VALUE {i}"); | ||
var value = redis.GetDatabase().StringGetAsync($"KEY-{i}").Result; | ||
Console.WriteLine(value.ToString()); | ||
} | ||
} | ||
} | ||
} |
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,7 @@ | ||
{ | ||
"profiles": { | ||
"Samples.RedisCore": { | ||
"commandName": "Project" | ||
} | ||
} | ||
} |
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,26 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFrameworks>net461;net47;netcoreapp2.0</TargetFrameworks> | ||
<Platforms>AnyCPU;x64;x86</Platforms> | ||
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT' "> | ||
<TargetFrameworks>netcoreapp2.0</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(TargetFramework)' != 'netcoreapp2.0'"> | ||
<RuntimeIdentifier>win-$(Platform)</RuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="StackExchange.Redis" Version="2.0.505" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Datadog.Trace.ClrProfiler.Managed\Datadog.Trace.ClrProfiler.Managed.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't you need an array of ints here?never mind, saw the changes loading the json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added support for a hex string. Made it easier to understand since ildasm shows everything in hex and the header defines them that way too.