public static void ParseHeader(Metadata header, out string sender, out DistributedInvocationId senderInvocationId, out string traceId, out string token) { sender = string.Empty; string relatedActivityId = string.Empty; string environment = string.Empty; traceId = string.Empty; token = string.Empty; foreach (var kvp in header) { if (kvp.Key == GrpcMetadata.TraceIdKey) { traceId = new Guid(kvp.ValueBytes).ToString(); } else if (kvp.Key == GrpcMetadata.RelatedActivityIdKey) { relatedActivityId = kvp.Value; } else if (kvp.Key == GrpcMetadata.EnvironmentKey) { environment = kvp.Value; } else if (kvp.Key == GrpcMetadata.SenderKey) { sender = kvp.Value; } else if (kvp.Key == GrpcMetadata.AuthKey) { token = kvp.Value; } } senderInvocationId = new DistributedInvocationId(relatedActivityId, environment); }
public GrpcWorkerClient(LoggingContext loggingContext, DistributedInvocationId invocationId, string ipAddress, int port, EventHandler <ConnectionFailureEventArgs> onConnectionFailureAsync) { m_loggingContext = loggingContext; m_connectionManager = new ClientConnectionManager(loggingContext, ipAddress, port, invocationId); m_connectionManager.OnConnectionFailureAsync += onConnectionFailureAsync; m_client = new Worker.WorkerClient(m_connectionManager.Channel); }
/// <summary> /// Class constructor /// </summary> internal GrpcServer(LoggingContext loggingContext, DistributedInvocationId invocationId) { m_loggingContext = loggingContext; m_invocationId = invocationId; }
/// <nodoc/> internal GrpcOrchestratorServer(LoggingContext loggingContext, IOrchestratorService orchestratorService, DistributedInvocationId invocationId) : base(loggingContext, invocationId) { m_grpcOrchestrator = new GrpcOrchestrator(orchestratorService); }
public RemoteWorkerHarness(LoggingContext loggingContext, DistributedInvocationId invocationId) : base(loggingContext, invocationId) { }
public DistributedActorHarness(LoggingContext loggingContext, DistributedInvocationId invocationId) { LoggingContext = loggingContext; InvocationId = invocationId; }
public OrchestratorHarness(LoggingContext context, DistributedInvocationId invocationId, int workerCount = 1) : base(context, invocationId) { RemoteWorkers = new RemoteWorkerHarness[workerCount]; }
public WorkerHarness(LoggingContext loggingContext, DistributedInvocationId invocationId, TimeSpan?callDelay = null) : base(loggingContext, invocationId) { m_callDelay = callDelay; }
/// <nodoc/> internal GrpcWorkerServer(LoggingContext loggingContext, IWorkerService workerService, DistributedInvocationId invocationId) : base(loggingContext, invocationId) { m_grpcWorker = new GrpcWorker(workerService); }
public GrpcOrchestratorClient(LoggingContext loggingContext, DistributedInvocationId invocationId) { m_invocationId = invocationId; m_loggingContext = loggingContext; }
public DistributionServiceMock(DistributedInvocationId invocationId) : base(invocationId) { }