public static IConfigurationBuilder AddDaprConfig( this IConfigurationBuilder configurationBuilder) { var httpEndpoint = DaprDefaults.GetDefaultHttpEndpoint(); return(configurationBuilder.AddInMemoryCollection(new[] { new KeyValuePair <string, string>("Yarp:Clusters:dapr-sidecar:Destinations:d1:Address", httpEndpoint), })); }
/// <summary> /// Initializes a new instance of the <see cref="DaprClientBuilder"/> class. /// </summary> public DaprClientBuilder() { this.GrpcEndpoint = DaprDefaults.GetDefaultGrpcEndpoint(); this.HttpEndpoint = DaprDefaults.GetDefaultHttpEndpoint(); this.GrpcChannelOptions = new GrpcChannelOptions() { // The gRPC client doesn't throw the right exception for cancellation // by default, this switches that behavior on. ThrowOperationCanceledOnCancellation = true, }; this.JsonSerializerOptions = new JsonSerializerOptions(JsonSerializerDefaults.Web); this.DaprApiToken = DaprDefaults.GetDefaultApiToken(); }
public InvocationHandler() { this.parsedEndpoint = new Uri(DaprDefaults.GetDefaultHttpEndpoint(), UriKind.Absolute); this.apiToken = DaprDefaults.GetDefaultApiToken(); }