Documentation ¶
Overview ¶
Package driver provide the implementation of config driver used in CfgManager
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct { }
Database - Used to load/save configuration in database
type Driver ¶
type Driver interface { // Load - load config item from config driver Load() (map[string]interface{}, error) // Save - save config item into config driver Save(cfg map[string]interface{}) error }
Driver the interface to save/load config
type RESTDriver ¶
type RESTDriver struct {
// contains filtered or unexported fields
}
RESTDriver - config store driver based on REST API
func NewRESTDriver ¶
func NewRESTDriver(configRESTURL string, modifiers ...modifier.Modifier) *RESTDriver
NewRESTDriver - Create RESTDriver
func (*RESTDriver) Load ¶
func (h *RESTDriver) Load() (map[string]interface{}, error)
Load - load config data from REST server
func (*RESTDriver) Save ¶
func (h *RESTDriver) Save(cfgMap map[string]interface{}) error
Save - Save config data to REST server by PUT method
Click to show internal directories.
Click to hide internal directories.