move unused GetCoreConfigInternal to common file to prevent ent panics (#16165)
This commit is contained in:
parent
3bc56cfcca
commit
895e422c4c
|
@ -7,7 +7,6 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/command/server"
|
||||
"github.com/hashicorp/vault/helper/namespace"
|
||||
"github.com/hashicorp/vault/sdk/helper/license"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
|
@ -71,16 +70,6 @@ func (c *Core) barrierViewForNamespace(namespaceId string) (*BarrierView, error)
|
|||
return c.systemBarrierView, nil
|
||||
}
|
||||
|
||||
// GetCoreConfigInternal returns the server configuration
|
||||
// in struct format.
|
||||
func (c *Core) GetCoreConfigInternal() *server.Config {
|
||||
conf := c.rawConfig.Load()
|
||||
if conf == nil {
|
||||
return nil
|
||||
}
|
||||
return conf.(*server.Config)
|
||||
}
|
||||
|
||||
func (c *Core) teardownReplicationResolverHandler() {}
|
||||
func createSecondaries(*Core, *CoreConfig) {}
|
||||
|
||||
|
|
|
@ -4,9 +4,20 @@ import (
|
|||
"context"
|
||||
|
||||
uuid "github.com/hashicorp/go-uuid"
|
||||
"github.com/hashicorp/vault/command/server"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
)
|
||||
|
||||
// GetCoreConfigInternal returns the server configuration
|
||||
// in struct format.
|
||||
func (c *Core) GetCoreConfigInternal() *server.Config {
|
||||
conf := c.rawConfig.Load()
|
||||
if conf == nil {
|
||||
return nil
|
||||
}
|
||||
return conf.(*server.Config)
|
||||
}
|
||||
|
||||
func (c *Core) loadHeaderHMACKey(ctx context.Context) error {
|
||||
ent, err := c.barrier.Get(ctx, indexHeaderHMACKeyPath)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue