etc

package
v2.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 5 Imported by: 30

Documentation

Overview

Package etc holds the project bootstrap configuration; it is commonly used for cluster configuration, service-component configuration and the like.

etc can only be configured through a configuration file and cannot be modified through the master management server. To use configuration in business code, prefer the config configuration center, whose data can be modified dynamically through the master management server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close closes configuration watching.

func Get

func Get(pattern string, def ...any) value.Value

Get returns the configuration value matching pattern, falling back to def when it is absent.

func GetConfigurator added in v2.1.0

func GetConfigurator() config.Configurator

GetConfigurator returns the configurator.

func Has

func Has(pattern string) bool

Has reports whether the configuration matching pattern exists.

func Match

func Match(patterns ...string) config.Matcher

Match matches several patterns and returns a matcher.

func Set

func Set(pattern string, value any) error

Set sets the configuration value for pattern.

func SetConfigurator added in v2.1.0

func SetConfigurator(configurator config.Configurator)

SetConfigurator sets the configurator.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL