-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mason Schneider
committed
Jul 30, 2014
1 parent
fe22d75
commit b31fccc
Showing
45 changed files
with
3,892 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto | ||
|
||
############################################################################### | ||
# Set default behavior for command prompt diff. | ||
# | ||
# This is need for earlier builds of msysgit that does not have it on by | ||
# default for csharp files. | ||
# Note: This is only used by command line | ||
############################################################################### | ||
#*.cs diff=csharp | ||
|
||
############################################################################### | ||
# Set the merge driver for project and solution files | ||
# | ||
# Merging from the command prompt will add diff markers to the files if there | ||
# are conflicts (Merging from VS is not affected by the settings below, in VS | ||
# the diff markers are never inserted). Diff markers may cause the following | ||
# file extensions to fail to load in VS. An alternative would be to treat | ||
# these files as binary and thus will always conflict and require user | ||
# intervention with every merge. To do so, just uncomment the entries below | ||
############################################################################### | ||
#*.sln merge=binary | ||
#*.csproj merge=binary | ||
#*.vbproj merge=binary | ||
#*.vcxproj merge=binary | ||
#*.vcproj merge=binary | ||
#*.dbproj merge=binary | ||
#*.fsproj merge=binary | ||
#*.lsproj merge=binary | ||
#*.wixproj merge=binary | ||
#*.modelproj merge=binary | ||
#*.sqlproj merge=binary | ||
#*.wwaproj merge=binary | ||
|
||
############################################################################### | ||
# behavior for image files | ||
# | ||
# image files are treated as binary by default. | ||
############################################################################### | ||
#*.jpg binary | ||
#*.png binary | ||
#*.gif binary | ||
|
||
############################################################################### | ||
# diff behavior for common document formats | ||
# | ||
# Convert binary document formats to text before diffing them. This feature | ||
# is only available from the command line. Turn it on by uncommenting the | ||
# entries below. | ||
############################################################################### | ||
#*.doc diff=astextplain | ||
#*.DOC diff=astextplain | ||
#*.docx diff=astextplain | ||
#*.DOCX diff=astextplain | ||
#*.dot diff=astextplain | ||
#*.DOT diff=astextplain | ||
#*.pdf diff=astextplain | ||
#*.PDF diff=astextplain | ||
#*.rtf diff=astextplain | ||
#*.RTF diff=astextplain |
86 changes: 86 additions & 0 deletions
86
Amazon.ElastiCacheCluster/Amazon.ElastiCacheCluster.csproj
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,86 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{1255EBD3-0340-4AF6-A5F2-3D97D8709546}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Amazon.ElastiCacheCluster</RootNamespace> | ||
<AssemblyName>Amazon.ElastiCacheCluster</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants> | ||
</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants> | ||
</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<DocumentationFile>bin\Release\Amazon.ElastiCacheCluster.XML</DocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SignAssembly>true</SignAssembly> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<AssemblyOriginatorKeyFile>awskey.snk</AssemblyOriginatorKeyFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Enyim.Caching"> | ||
<HintPath>..\packages\EnyimMemcached.2.12\lib\net35\Enyim.Caching.dll</HintPath> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.configuration" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="ClusterConfigSettings.cs" /> | ||
<Compile Include="ClusterClient.cs" /> | ||
<Compile Include="Factories\DefaultConfigNodeFactory.cs" /> | ||
<Compile Include="Factories\IConfigNodeFactory.cs" /> | ||
<Compile Include="Operations\GetHelper.cs" /> | ||
<Compile Include="Operations\GetOperation.cs" /> | ||
<Compile Include="Helpers\AddrUtil.cs" /> | ||
<Compile Include="Operations\IConfigOperation.cs" /> | ||
<Compile Include="Pools\AutoBinaryPool.cs" /> | ||
<Compile Include="ElastiCacheClusterConfig.cs" /> | ||
<Compile Include="Pools\AutoServerPool.cs" /> | ||
<Compile Include="Operations\ConfigGetOperation.cs" /> | ||
<Compile Include="ConfigurationPoller.cs" /> | ||
<Compile Include="DiscoveryNode.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="Helpers\TextSocketHelper.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="awskey.snk" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
20 changes: 20 additions & 0 deletions
20
Amazon.ElastiCacheCluster/Amazon.ElastiCacheCluster.nuspec
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 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>$id$</id> | ||
<version>$version$</version> | ||
<title>$title$</title> | ||
<authors>$author$</authors> | ||
<owners>$author$</owners> | ||
<iconUrl>http://media.amazonwebservices.com/aws_singlebox_01.png</iconUrl> | ||
<licenseUrl>http://aws.amazon.com/apache2.0</licenseUrl> | ||
<projectUrl>https://github.com/awslabs/elasticache-cluster-config-net</projectUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>$description$</description> | ||
<copyright>Copyright 2014</copyright> | ||
<tags>AWS Amazon cloud elasticache clusterclient aws amazon ElastiCacheCluster elasticacheclusterconfig cluster config clusterconfig elasticachenetclusterclient ElastiCache</tags> | ||
<dependencies> | ||
<dependency id="EnyimMemcached" version="2.12" /> | ||
</dependencies> | ||
</metadata> | ||
</package> |
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,69 @@ | ||
/* | ||
* Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using Enyim.Caching; | ||
|
||
namespace Amazon.ElastiCacheCluster | ||
{ | ||
/// <summary> | ||
/// Used to instantiate MemcachedClients with auto discovery enabled. | ||
/// Only use these for easy creation because the ability to get information from the config object is lost | ||
/// </summary> | ||
public static class ClusterClient | ||
{ | ||
/// <summary> | ||
/// Creates a MemcachedClient using the settings found in the app.config section "clusterclient" | ||
/// </summary> | ||
/// <returns>A new MemcachedClient configured for auto discovery</returns> | ||
public static MemcachedClient CreateClient() | ||
{ | ||
return new MemcachedClient(new ElastiCacheClusterConfig()); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a MemcachedClient using the settings found in the app.config section specified | ||
/// </summary> | ||
/// <param name="section">A section in app.config that has a endpoint field</param> | ||
/// <returns>A new MemcachedClient configured for auto discovery</returns> | ||
public static MemcachedClient CreateClient(string section) | ||
{ | ||
return new MemcachedClient(new ElastiCacheClusterConfig(section)); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a MemcachedClient using the default settings with the endpoint and port specified | ||
/// </summary> | ||
/// <param name="endpoint">The url for the cluster endpoint containing .cfg.</param> | ||
/// <param name="port">The port to access the cluster on</param> | ||
/// <returns>A new MemcachedClient configured for auto discovery</returns> | ||
public static MemcachedClient CreateClient(string endpoint, int port) | ||
{ | ||
return new MemcachedClient(new ElastiCacheClusterConfig(endpoint, port)); | ||
} | ||
|
||
/// <summary> | ||
/// Creates a MemcachedClient using the Client config provided | ||
/// </summary> | ||
/// <param name="config">The config to instantiate the client with</param> | ||
/// <returns>A new MemcachedClient configured for auto discovery</returns> | ||
public static MemcachedClient CreateClient(ElastiCacheClusterConfig config) | ||
{ | ||
return new MemcachedClient(config); | ||
} | ||
} | ||
} |
Oops, something went wrong.