Add /v1/core/config endpoint to cluster API

This commit is contained in:
Ingo Oppermann
2023-06-22 16:33:06 +02:00
parent faf0aab53a
commit cbe6754b2f
5 changed files with 1905 additions and 39 deletions

View File

@@ -39,6 +39,7 @@ type Cluster interface {
// CoreAPIAddress returns the address of the core API of a node with
// the given raft address.
CoreAPIAddress(raftAddress string) (string, error)
CoreConfig() *config.Config
About() (ClusterAbout, error)
@@ -361,6 +362,10 @@ func (c *cluster) CoreAPIAddress(raftAddress string) (string, error) {
return coreAddress, err
}
func (c *cluster) CoreConfig() *config.Config {
return c.config.Clone()
}
func (c *cluster) Shutdown() error {
c.logger.Info().Log("Shutting down cluster")
c.shutdownLock.Lock()