mirror of
https://github.com/sot-tech/mochi.git
synced 2026-04-26 07:30:00 -07:00
Add cmd option for quick start w/o config file
This commit is contained in:
@@ -18,14 +18,18 @@ import (
|
||||
"github.com/sot-tech/mochi/storage"
|
||||
)
|
||||
|
||||
// Default config constants.
|
||||
const defaultShardCount = 1024
|
||||
const (
|
||||
// Name - registered name of the storage
|
||||
Name = "memory"
|
||||
// Default config constants.
|
||||
defaultShardCount = 1024
|
||||
)
|
||||
|
||||
var logger = log.NewLogger("storage/memory")
|
||||
|
||||
func init() {
|
||||
// Register the storage driver.
|
||||
storage.RegisterDriver("memory", builder)
|
||||
storage.RegisterDriver(Name, builder)
|
||||
}
|
||||
|
||||
func builder(icfg conf.MapConfig) (storage.PeerStorage, error) {
|
||||
|
||||
Reference in New Issue
Block a user