Documentation
¶
Index ¶
- Variables
- type Config
- type Option
- type ReadOnlyConfig
- func (c *ReadOnlyConfig) DiscoveryAddress() (string, error)
- func (c *ReadOnlyConfig) DiscoveryOfflineThreshold() (time.Duration, error)
- func (c *ReadOnlyConfig) HTTPSAllowedCredentials() (bool, error)
- func (c *ReadOnlyConfig) HTTPSAllowedHeaders() (string, error)
- func (c *ReadOnlyConfig) HTTPSAllowedMethods() (string, error)
- func (c *ReadOnlyConfig) HTTPSAllowedOrigin() (string, error)
- func (c *ReadOnlyConfig) OfflineThreshold() (time.Duration, error)
- func (c *ReadOnlyConfig) ProxyHTTP() (string, error)
- func (c *ReadOnlyConfig) ProxyHTTPS() (string, error)
- type Tx
Constants ¶
This section is empty.
Variables ¶
var Schema = config.Schema{ "cluster.offline_threshold": {Type: config.Int64, Default: clusterOfflineThresholdDefault(), Validator: offlineThresholdValidator}, "core.proxy_http": {}, "core.proxy_https": {}, "core.https_allowed_headers": {}, "core.https_allowed_methods": {}, "core.https_allowed_origin": {}, "core.https_allowed_credentials": {Type: config.Bool}, "discovery.https_address": {}, "discovery.offline_threshold": {Type: config.Int64, Default: discoveryOfflineThresholdDefault(), Validator: offlineThresholdValidator}, }
Schema defines available server configuration keys.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
*ReadOnlyConfig
// contains filtered or unexported fields
}
Config holds cluster-wide configuration values.
func Load ¶
Load a new Config object with the current cluster configuration values fetched from the database.
func (*Config) Dump ¶
Dump current configuration keys and their values. Keys with values matching their defaults are omitted.
func (*Config) Patch ¶
Patch changes only the configuration keys in the given map.
Return what has actually changed.
func (*Config) ReadOnly ¶
func (c *Config) ReadOnly() *ReadOnlyConfig
ReadOnly returns the underlying readonly map
type Option ¶
type Option func(*options)
Option to be passed to New to customize the resulting instance.
type ReadOnlyConfig ¶
type ReadOnlyConfig struct {
// contains filtered or unexported fields
}
ReadOnlyConfig only allows the reading of values from the map
func NewReadOnlyConfig ¶
NewReadOnlyConfig creates a read only configuration with values
func (*ReadOnlyConfig) DiscoveryAddress ¶
func (c *ReadOnlyConfig) DiscoveryAddress() (string, error)
DiscoveryAddress returns the API address for the discovery service
func (*ReadOnlyConfig) DiscoveryOfflineThreshold ¶
func (c *ReadOnlyConfig) DiscoveryOfflineThreshold() (time.Duration, error)
DiscoveryOfflineThreshold returns the configured heartbeat threshold, i.e. the number of seconds before after which an unresponsive service node is considered offline..
func (*ReadOnlyConfig) HTTPSAllowedCredentials ¶
func (c *ReadOnlyConfig) HTTPSAllowedCredentials() (bool, error)
HTTPSAllowedCredentials returns the relevant CORS setting.
func (*ReadOnlyConfig) HTTPSAllowedHeaders ¶
func (c *ReadOnlyConfig) HTTPSAllowedHeaders() (string, error)
HTTPSAllowedHeaders returns the relevant CORS setting.
func (*ReadOnlyConfig) HTTPSAllowedMethods ¶
func (c *ReadOnlyConfig) HTTPSAllowedMethods() (string, error)
HTTPSAllowedMethods returns the relevant CORS setting.
func (*ReadOnlyConfig) HTTPSAllowedOrigin ¶
func (c *ReadOnlyConfig) HTTPSAllowedOrigin() (string, error)
HTTPSAllowedOrigin returns the relevant CORS setting.
func (*ReadOnlyConfig) OfflineThreshold ¶
func (c *ReadOnlyConfig) OfflineThreshold() (time.Duration, error)
OfflineThreshold returns the configured heartbeat threshold, i.e. the number of seconds before after which an unresponsive node is considered offline..
func (*ReadOnlyConfig) ProxyHTTP ¶
func (c *ReadOnlyConfig) ProxyHTTP() (string, error)
ProxyHTTP returns the configured HTTP proxy, if any.
func (*ReadOnlyConfig) ProxyHTTPS ¶
func (c *ReadOnlyConfig) ProxyHTTPS() (string, error)
ProxyHTTPS returns the configured HTTPS proxy, if any.
type Tx ¶
type Tx interface {
// Config fetches all node-level config keys.
Config() (map[string]string, error)
// UpdateConfig updates the given node-level configuration keys in the
// config table. Config keys set to empty values will be deleted.
UpdateConfig(map[string]string) error
}
Tx models a single interaction with a cluster database.