Skip to content

Commit

Permalink
server/config: un-export some functions no longer used outside the mo…
Browse files Browse the repository at this point in the history
…dule

Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
dcbw committed Sep 14, 2023
1 parent c2add82 commit fb4f4aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions pkg/server/config/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func newManager(config MultusConf, defaultCNIPluginName string) (*Manager, error
}

if config.OverrideNetworkName {
if err := configManager.OverrideNetworkName(); err != nil {
if err := configManager.overrideNetworkName(); err != nil {
return nil, logging.Errorf("could not override the network name: %v", err)
}
}
Expand All @@ -150,7 +150,7 @@ func (m *Manager) Start(ctx context.Context, wg *sync.WaitGroup) error {
wg.Add(1)
go func() {
defer wg.Done()
if err := m.MonitorPluginConfiguration(ctx); err != nil {
if err := m.monitorPluginConfiguration(ctx); err != nil {
_ = logging.Errorf("error watching file: %v", err)
}
logging.Verbosef("ConfigWatcher done")
Expand All @@ -174,9 +174,9 @@ func (m *Manager) loadPrimaryCNIConfigFromFile() error {
return m.loadPrimaryCNIConfigurationData(primaryCNIConfigData)
}

// OverrideNetworkName overrides the name of the multus configuration with the
// overrideNetworkName overrides the name of the multus configuration with the
// name of the delegated primary CNI.
func (m *Manager) OverrideNetworkName() error {
func (m *Manager) overrideNetworkName() error {
name, ok := m.cniConfigData["name"]
if !ok {
return fmt.Errorf("failed to access delegate CNI plugin name")
Expand Down Expand Up @@ -207,10 +207,10 @@ func (m *Manager) GenerateConfig() (string, error) {
return m.multusConfig.Generate()
}

// MonitorPluginConfiguration monitors the configuration file pointed
// monitorPluginConfiguration monitors the configuration file pointed
// to by the primaryCNIPluginName attribute, and re-generates the multus
// configuration whenever the primary CNI config is updated.
func (m *Manager) MonitorPluginConfiguration(ctx context.Context) error {
func (m *Manager) monitorPluginConfiguration(ctx context.Context) error {
logging.Verbosef("started to watch file %s", m.primaryCNIConfigPath)

for {
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/config/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ var _ = Describe("Configuration Manager", func() {

When("the user requests the name of the multus configuration to be overridden", func() {
BeforeEach(func() {
Expect(configManager.OverrideNetworkName()).To(Succeed())
Expect(configManager.overrideNetworkName()).To(Succeed())
})

It("Overrides the name of the multus configuration when requested", func() {
Expand Down

0 comments on commit fb4f4aa

Please sign in to comment.