*: move "etcdserver/api/v3compactor"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee 2018-05-21 10:04:02 -07:00
parent 871c218894
commit 2dd555c983
9 changed files with 14 additions and 14 deletions

View File

@ -27,8 +27,8 @@ import (
"sync"
"time"
"github.com/coreos/etcd/compactor"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3compactor"
"github.com/coreos/etcd/pkg/flags"
"github.com/coreos/etcd/pkg/netutil"
"github.com/coreos/etcd/pkg/srv"
@ -94,7 +94,7 @@ var (
// If "AutoCompactionMode" is CompactorModePeriodic and
// "AutoCompactionRetention" is "1h", it automatically compacts
// compacts storage every hour.
CompactorModePeriodic = compactor.ModePeriodic
CompactorModePeriodic = v3compactor.ModePeriodic
// CompactorModeRevision is revision-based compaction mode
// for "Config.AutoCompactionMode" field.
@ -102,7 +102,7 @@ var (
// "AutoCompactionRetention" is "1000", it compacts log on
// revision 5000 when the current revision is 6000.
// This runs every 5-minute if enough of logs have proceeded.
CompactorModeRevision = compactor.ModeRevision
CompactorModeRevision = v3compactor.ModeRevision
)
func init() {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compactor
package v3compactor
import (
"context"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compactor
package v3compactor
import (
"context"

View File

@ -12,5 +12,5 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// Package compactor implements automated policies for compacting etcd's mvcc storage.
package compactor
// Package v3compactor implements automated policies for compacting etcd's mvcc storage.
package v3compactor

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compactor
package v3compactor
import (
"context"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compactor
package v3compactor
import (
"reflect"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compactor
package v3compactor
import (
"context"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compactor
package v3compactor
import (
"reflect"

View File

@ -30,7 +30,6 @@ import (
"time"
"github.com/coreos/etcd/auth"
"github.com/coreos/etcd/compactor"
"github.com/coreos/etcd/etcdserver/api"
"github.com/coreos/etcd/etcdserver/api/membership"
"github.com/coreos/etcd/etcdserver/api/snap"
@ -39,6 +38,7 @@ import (
stats "github.com/coreos/etcd/etcdserver/api/v2stats"
"github.com/coreos/etcd/etcdserver/api/v2store"
"github.com/coreos/etcd/etcdserver/api/v3alarm"
"github.com/coreos/etcd/etcdserver/api/v3compactor"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/lease"
"github.com/coreos/etcd/lease/leasehttp"
@ -241,7 +241,7 @@ type EtcdServer struct {
SyncTicker *time.Ticker
// compactor is used to auto-compact the KV.
compactor compactor.Compactor
compactor v3compactor.Compactor
// peerRt used to send requests (version, lease) to peers.
peerRt http.RoundTripper
@ -568,7 +568,7 @@ func NewServer(cfg ServerConfig) (srv *EtcdServer, err error) {
}
srv.authStore = auth.NewAuthStore(srv.getLogger(), srv.be, tp, int(cfg.BcryptCost))
if num := cfg.AutoCompactionRetention; num != 0 {
srv.compactor, err = compactor.New(cfg.Logger, cfg.AutoCompactionMode, num, srv.kv, srv)
srv.compactor, err = v3compactor.New(cfg.Logger, cfg.AutoCompactionMode, num, srv.kv, srv)
if err != nil {
return nil, err
}