only enable rcmgr by default in full nodes

opt-in with envvar for other nodes, as there are still some issues
with markets related protocols
This commit is contained in:
vyzo
2022-05-31 12:03:03 +03:00
parent 000b932cac
commit a313dcba74
4 changed files with 14 additions and 1 deletions
+4
View File
@@ -417,6 +417,10 @@ type fsLockedRepo struct {
configLk sync.Mutex
}
func (fsr *fsLockedRepo) RepoType() RepoType {
return fsr.repoType
}
func (fsr *fsLockedRepo) Readonly() bool {
return fsr.readonly
}
+3
View File
@@ -52,6 +52,9 @@ type LockedRepo interface {
// Close closes repo and removes lock.
Close() error
// returns the type of this repo
RepoType() RepoType
// Returns datastore defined in this repo.
// The supplied context must only be used to initialize the datastore.
// The implementation should not retain the context for usage throughout
+4
View File
@@ -55,6 +55,10 @@ type lockedMemRepo struct {
token *byte
}
func (lmem *lockedMemRepo) RepoType() RepoType {
return lmem.t
}
func (lmem *lockedMemRepo) GetStorage() (stores.StorageConfig, error) {
if err := lmem.checkToken(); err != nil {
return stores.StorageConfig{}, err