mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-05-01 18:12:51 +08:00

* test for issue * added service fabric sample * working!! * changed sample naming to Ocelot * removed files we dont need * removed files we dont need * updated sample gitignore * updated sample gitignore * getting ocelot to work with service fabric using the reverse proxy * #238 - added support for service fabric discovery provider, proxies requests through naming service, wont work on partioned service fabric services yet * #238 - Manually tested service fabric using sample..all seems OK. Made some changes after testing, added docs * #238 - added docs for servic fabric
31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
// ------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
|
|
// ------------------------------------------------------------
|
|
|
|
namespace OcelotApplicationApiGateway
|
|
{
|
|
using System.Fabric;
|
|
using Microsoft.ServiceFabric.Services.Communication.Runtime;
|
|
using Microsoft.ServiceFabric.Services.Runtime;
|
|
using System.Collections.Generic;
|
|
|
|
/// Service that handles front-end web requests and acts as a proxy to the back-end data for the UI web page.
|
|
/// It is a stateless service that hosts a Web API application on OWIN.
|
|
internal sealed class OcelotServiceWebService : StatelessService
|
|
{
|
|
public OcelotServiceWebService(StatelessServiceContext context)
|
|
: base(context)
|
|
{ }
|
|
|
|
protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners()
|
|
{
|
|
return new[]
|
|
{
|
|
new ServiceInstanceListener(
|
|
initparams => new WebCommunicationListener(string.Empty, initparams),
|
|
"OcelotServiceWebListener")
|
|
};
|
|
}
|
|
}
|
|
} |