Add cmd option for quick start w/o config file

This commit is contained in:
Lawrence, Rendall
2022-11-18 18:28:19 +03:00
parent db671d3891
commit ef6d820c5b
7 changed files with 97 additions and 49 deletions

View File

@@ -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) {