-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load cluster configuration from YAML
Signed-off-by: Michael Edgar <[email protected]>
- Loading branch information
Showing
14 changed files
with
337 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
api/src/main/java/com/github/eyefloaters/console/api/config/ConsoleConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.github.eyefloaters.console.api.config; | ||
|
||
public class ConsoleConfig { | ||
|
||
KafkaConfig kafka = new KafkaConfig(); | ||
|
||
public KafkaConfig getKafka() { | ||
return kafka; | ||
} | ||
|
||
public void setKafka(KafkaConfig kafka) { | ||
this.kafka = kafka; | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
api/src/main/java/com/github/eyefloaters/console/api/config/KafkaClusterConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package com.github.eyefloaters.console.api.config; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
|
||
public class KafkaClusterConfig { | ||
|
||
private String name; | ||
private String namespace; | ||
private String listener; | ||
private boolean readOnly; | ||
private Map<String, String> properties = new HashMap<>(); | ||
private Map<String, String> adminProperties = new HashMap<>(); | ||
private Map<String, String> consumerProperties = new HashMap<>(); | ||
private Map<String, String> producerProperties = new HashMap<>(); | ||
|
||
@JsonIgnore | ||
public String clusterKey() { | ||
return "%s/%s".formatted(namespace, name); | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getNamespace() { | ||
return namespace; | ||
} | ||
|
||
public void setNamespace(String namespace) { | ||
this.namespace = namespace; | ||
} | ||
|
||
public String getListener() { | ||
return listener; | ||
} | ||
|
||
public void setListener(String listener) { | ||
this.listener = listener; | ||
} | ||
|
||
public boolean isReadOnly() { | ||
return readOnly; | ||
} | ||
|
||
public void setReadOnly(boolean readOnly) { | ||
this.readOnly = readOnly; | ||
} | ||
|
||
public Map<String, String> getProperties() { | ||
return properties; | ||
} | ||
|
||
public void setProperties(Map<String, String> properties) { | ||
this.properties = properties; | ||
} | ||
|
||
public Map<String, String> getAdminProperties() { | ||
return adminProperties; | ||
} | ||
|
||
public void setAdminProperties(Map<String, String> adminProperties) { | ||
this.adminProperties = adminProperties; | ||
} | ||
|
||
public Map<String, String> getConsumerProperties() { | ||
return consumerProperties; | ||
} | ||
|
||
public void setConsumerProperties(Map<String, String> consumerProperties) { | ||
this.consumerProperties = consumerProperties; | ||
} | ||
|
||
public Map<String, String> getProducerProperties() { | ||
return producerProperties; | ||
} | ||
|
||
public void setProducerProperties(Map<String, String> producerProperties) { | ||
this.producerProperties = producerProperties; | ||
} | ||
|
||
} |
Oops, something went wrong.