Skip to content

Commit

Permalink
Change emptylocker to defaultlocker (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannatao authored Mar 18, 2021
1 parent 50a7f34 commit 7b3b1d5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type CloudConfig struct {
Property string `yaml:"property" json:"property" default:"database"`
Module string `yaml:"module" json:"module" default:"database"`
SyncLinks []string `yaml:"synclinks" json:"synclinks" default:"[\"httplink\"]"`
Locker string `yaml:"locker" json:"locker" default:"emptylocker"`
Locker string `yaml:"locker" json:"locker" default:"defaultlocker"`
Task string `yaml:"task" json:"task" default:"database"`
DM string `yaml:"dm" json:"dm" default:"databaseext"`
} `yaml:"plugin" json:"plugin"`
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestDefaultValue(t *testing.T) {
expect.Plugin.Module = "database"
expect.Plugin.SyncLinks = []string{"httplink"}
expect.Plugin.Pubsub = "defaultpubsub"
expect.Plugin.Locker = "emptylocker"
expect.Plugin.Locker = "defaultlocker"
expect.Plugin.Task = "database"
expect.Lock.ExpireTime = 5
expect.Plugin.DM = "databaseext"
Expand Down
2 changes: 1 addition & 1 deletion plugin/default/lock/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package lock
type CloudConfig struct {
DefaultLocker struct {
Storage string `yaml:"storage" json:"storage" default:"database"`
} `yaml:"emptylocker" json:"emptylocker"`
} `yaml:"defaultlocker" json:"defaultlocker"`
}
2 changes: 1 addition & 1 deletion plugin/default/lock/empty_lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package lock
import "github.com/baetyl/baetyl-cloud/v2/plugin"

func init() {
plugin.RegisterFactory("emptylocker", New)
plugin.RegisterFactory("defaultlocker", New)
}

type emptyLocker struct{}
Expand Down

0 comments on commit 7b3b1d5

Please sign in to comment.