Пример #1
0
 public static HerculesResult <TimelineDescription> GetTimelineDescription(
     [NotNull] this IHerculesManagementClient client,
     [NotNull] string name,
     TimeSpan timeout) =>
 client.GetTimelineDescriptionAsync(name, timeout).GetAwaiter().GetResult();
Пример #2
0
 public static HerculesResult CreateTimeline(
     [NotNull] this IHerculesManagementClient client,
     [NotNull] CreateTimelineQuery query,
     TimeSpan timeout) =>
 client.CreateTimelineAsync(query, timeout).GetAwaiter().GetResult();
Пример #3
0
 public static DeleteTimelineResult DeleteTimeline(
     [NotNull] this IHerculesManagementClient client,
     [NotNull] string name,
     TimeSpan timeout) =>
 client.DeleteTimelineAsync(name, timeout).GetAwaiter().GetResult();
 // NOTE: Stream deletion doesn't work on Windows due to Kafka's guarantees
 private static IDisposable CreateStreamDeletion(IHerculesManagementClient client, string streamName)
 {
     return(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? new Disposable(() => client.DeleteStream(streamName, Timeout)) : new Disposable(() => {}));
 }