mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-11 23:43:29 -07:00
comment/lint clean PeerStore
This commit is contained in:
committed by
Jimmy Zelinskie
parent
e1cf159d9c
commit
94dc902b20
@@ -14,10 +14,14 @@ import (
|
||||
|
||||
// TODO(jzelinskie): separate ipv4 and ipv6 swarms
|
||||
|
||||
// Config holds the configuration of a memory PeerStore.
|
||||
type Config struct {
|
||||
ShardCount int `yaml:"shard_count"`
|
||||
}
|
||||
|
||||
// New creates a new memory PeerStore.
|
||||
//
|
||||
// The PeerStore will have at least one shard.
|
||||
func New(cfg Config) (storage.PeerStore, error) {
|
||||
shardCount := 1
|
||||
if cfg.ShardCount > 0 {
|
||||
|
||||
Reference in New Issue
Block a user