Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (20 sloc) 0.578 kB
package main
import (
"github.com/dustin/go-broadcast"
"github.com/couchbaselabs/cbfs/config"
)
const configKey = "/@globalConfig"
type configChange struct {
old, current *cbfsconfig.CBFSConfig
}
var confBroadcaster = broadcast.NewBroadcaster(64)
// Update this config within a bucket.
func StoreConfig(conf cbfsconfig.CBFSConfig) error {
return couchbase.Set(configKey, 0, &conf)
}
// Update this config from the db.
func RetrieveConfig() (*cbfsconfig.CBFSConfig, error) {
conf := &cbfsconfig.CBFSConfig{}
err := couchbase.Get(configKey, conf)
return conf, err
}
Jump to Line
Something went wrong with that request. Please try again.