Ejemplo n.º 1
0
        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),
            }));
        }
Ejemplo n.º 2
0
        /// <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();
        }
Ejemplo n.º 3
0
 public InvocationHandler()
 {
     this.parsedEndpoint = new Uri(DaprDefaults.GetDefaultHttpEndpoint(), UriKind.Absolute);
     this.apiToken       = DaprDefaults.GetDefaultApiToken();
 }