Documentation ¶
Overview ¶
Package polaris implements gcfg.Adapter using polaris service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements gcfg.Adapter implementing using polaris service.
func (*Client) Available ¶
Available checks and returns the backend configuration service is available. The optional parameter `resource` specifies certain configuration resource.
Note that this function does not return error as it just does simply check for backend configuration service.
func (*Client) Data ¶
Data retrieves and returns all configuration data in current resource as map. Note that this function may lead to lots of memory usage if configuration data are too large, you can implement this function if necessary.
type Config ¶
type Config struct { // The namespace of the configuration. Namespace string `v:"required"` // The group of the configuration. FileGroup string `v:"required"` // The name of the configuration. FileName string `v:"required"` // The path of the polaris configuration file. Path string `v:"required"` // The log directory for polaris. LogDir string // Watch watches remote configuration updates, which updates local configuration in memory immediately when remote configuration changes. Watch bool }
Config is the configuration for polaris.