comment/lint clean PeerStore
This commit is contained in:
parent
e1cf159d9c
commit
94dc902b20
1 changed files with 4 additions and 0 deletions
|
@ -14,10 +14,14 @@ import (
|
||||||
|
|
||||||
// TODO(jzelinskie): separate ipv4 and ipv6 swarms
|
// TODO(jzelinskie): separate ipv4 and ipv6 swarms
|
||||||
|
|
||||||
|
// Config holds the configuration of a memory PeerStore.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
ShardCount int `yaml:"shard_count"`
|
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) {
|
func New(cfg Config) (storage.PeerStore, error) {
|
||||||
shardCount := 1
|
shardCount := 1
|
||||||
if cfg.ShardCount > 0 {
|
if cfg.ShardCount > 0 {
|
||||||
|
|
Loading…
Reference in a new issue