Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
InitConfig initializes a client config from an io.Reader.
func Register ¶
func Register(name string, fn StoreConfigurator) error
Register registers the StoreConfigurator with the config system.
Types ¶
type ServerConfig ¶
type ServerConfig struct {
Stores map[string]StoreConfig `yaml:"stores"`
}
ServerConfig is the main server configuration.
func InitServerConfig ¶
func InitServerConfig(r io.Reader) (*ServerConfig, error)
InitServerConfig initializes a server configuration from an io.Reader.
type StoreConfig ¶
type StoreConfig struct { Backend string // Embedded holds an embedded implementation-specific configuration. Embedded interface{} }
StoreConfig is a partial store configuration.
func (*StoreConfig) UnmarshalYAML ¶
func (c *StoreConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler.
type StoreConfigurator ¶
type StoreConfigurator func(cfg *StoreConfig, unmarshal func(interface{}) error) error
A StoreConfigurator is a function that given a raw config YAML value produces a implementation specific store config.
Click to show internal directories.
Click to hide internal directories.