libs/common: refactor libs common 3 (#4232)

* libs/common: refactor libs common 3

- move nil.go into types folder and make private
- move service & baseservice out of common into service pkg

ref #4147

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* add changelog entry
This commit is contained in:
Marko
2019-12-11 09:31:25 +01:00
committed by GitHub
parent efc27ab0b9
commit 27b00cf8d1
50 changed files with 163 additions and 150 deletions

View File

@@ -14,6 +14,7 @@ import (
auto "github.com/tendermint/tendermint/libs/autofile"
cmn "github.com/tendermint/tendermint/libs/common"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/service"
"github.com/tendermint/tendermint/types"
tmtime "github.com/tendermint/tendermint/types/time"
)
@@ -78,7 +79,7 @@ type WAL interface {
// so it's either reading or appending - must read to end to start appending
// again.
type baseWAL struct {
cmn.BaseService
service.BaseService
group *auto.Group
@@ -107,7 +108,7 @@ func NewWAL(walFile string, groupOptions ...func(*auto.Group)) (*baseWAL, error)
enc: NewWALEncoder(group),
flushInterval: walDefaultFlushInterval,
}
wal.BaseService = *cmn.NewBaseService(nil, "baseWAL", wal)
wal.BaseService = *service.NewBaseService(nil, "baseWAL", wal)
return wal, nil
}