Beispiel #1
0
 public async Task RequestCredentialGeneration(Capability capability)
 {
     await _kafkaJanitorClient.Access.RequestAsync(
         new ServiceAccountRequestInput
     {
         CapabilityName   = capability.Name,
         CapabilityId     = capability.Id.ToString(),
         CapabilityRootId = capability.RootId,
         TopicPrefix      = TopicName.CreatePrefix(capability.RootId)
     }
         );
 }
Beispiel #2
0
        public async Task CreateTopic(Topic topic, Capability capability)
        {
            await _kafkaJanitorClient.Topics.CreateAsync(new KafkaJanitor.RestClient.Features.Topics.Models.Topic
            {
                Name           = topic.Name.Name,
                Description    = topic.Description,
                Partitions     = topic.Partitions,
                Configurations = topic.Configurations
            });

            await _kafkaJanitorClient.Access.RequestAsync(
                new ServiceAccountRequestInput
            {
                CapabilityName   = capability.Name,
                CapabilityId     = capability.Id.ToString(),
                CapabilityRootId = capability.RootId,
                TopicPrefix      = TopicName.CreatePrefix(capability.RootId)
            }
                );
        }