Ejemplo n.º 1
0
        internal static SecuritySetting GetClusterSecurityDetails()
        {
            if (instance == null)
            {
                lock (instanceCreationLockObject)
                {
                    if (instance == null)
                    {
                        instance = new SecuritySetting();
                    }
                }
            }

            return(instance);
        }
Ejemplo n.º 2
0
        internal static SecuritySetting GetClusterSecurityForTesting(EndpointProtocol endpointProtocol)
        {
            if (instance == null)
            {
                lock (instanceCreationLockObject)
                {
                    if (instance == null)
                    {
                        instance = new SecuritySetting(endpointProtocol);
                    }
                }
            }

            return(instance);
        }
        public Task <string> OpenAsync(CancellationToken cancellationToken)
        {
            var endpoint = this.serviceContext.CodePackageActivationContext.GetEndpoint("RestEndpoint");
            var fabricSecuritySetting = SecuritySetting.GetClusterSecurityDetails();

            var listeningAddress = String.Format(CultureInfo.InvariantCulture, "{0}://+:{1}/", fabricSecuritySetting.EndpointProtocol, endpoint.Port);
            var publishUri       = listeningAddress.Replace("+", FabricRuntime.GetNodeContext().IPAddressOrFQDN);

            this.owinHttpServer = new OwinHttpServer(this.currentRuntime, fabricSecuritySetting, cancellationToken);
            this.owinHttpServer.StartOwinHttpServer(listeningAddress);

            EventStoreLogger.Logger.LogMessage("Uri: {0}", publishUri);

            return(Task.FromResult(publishUri));
        }
Ejemplo n.º 4
0
 internal Startup(EventStoreRuntime currentRuntime, SecuritySetting securitySetting, CancellationToken cancellationToken)
 {
     this.controllerSetting     = new ControllerSetting(currentRuntime, cancellationToken);
     this.fabricSecuritySetting = securitySetting;
 }
Ejemplo n.º 5
0
 internal OwinHttpServer(EventStoreRuntime currentRuntime, SecuritySetting fabricBrSecuritySetting, CancellationToken cancellationToken)
 {
     this.owinStartup = new Startup(currentRuntime, fabricBrSecuritySetting, cancellationToken);
 }