mirror of
https://github.com/datarhei/core.git
synced 2025-10-05 16:07:07 +08:00
Add /v1/core/config endpoint to cluster API
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user