Skip to content

Commit

Permalink
Refactor config: move config and dynamiconfig one level up (cadence-w…
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng authored Apr 9, 2021
1 parent 429cb11 commit b031307
Show file tree
Hide file tree
Showing 192 changed files with 189 additions and 189 deletions.
2 changes: 1 addition & 1 deletion bench/lib/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package lib
import (
"errors"

"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion canary/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"go.uber.org/cadence/.gen/go/cadence/workflowserviceclient"
"go.uber.org/zap"

"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/clientfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ import (
"github.com/uber/cadence/client/history"
"github.com/uber/cadence/client/matching"
"github.com/uber/cadence/common"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log"
"github.com/uber/cadence/common/membership"
"github.com/uber/cadence/common/metrics"
"github.com/uber/cadence/common/service/dynamicconfig"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/matching/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"

"github.com/uber/cadence/common"
"github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/types"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

"github.com/uber/cadence/bench"
"github.com/uber/cadence/bench/lib"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/canary/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/urfave/cli"

"github.com/uber/cadence/canary"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
)

func startHandler(c *cli.Context) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/cadence/cadence.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/urfave/cli"

"github.com/uber/cadence/common"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/tools/cassandra"
"github.com/uber/cadence/tools/sql"
)
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/cadence/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ import (
"github.com/uber/cadence/common/authorization"
"github.com/uber/cadence/common/blobstore/filestore"
"github.com/uber/cadence/common/cluster"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/elasticsearch"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/messaging/kafka"
"github.com/uber/cadence/common/metrics"
"github.com/uber/cadence/common/service"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/service/frontend"
"github.com/uber/cadence/service/history"
"github.com/uber/cadence/service/matching"
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type VisibilityArchiver interface {

Modify the `./provider/provider.go` file so that the `ArchiverProvider` knows how to create an instance of your archiver.
Also, add configs for you archiver to static yaml config files and modify the `HistoryArchiverProvider`
and `VisibilityArchiverProvider` struct in the `../common/service/config.go` accordingly.
and `VisibilityArchiverProvider` struct in the `../common/config.go` accordingly.


## FAQ
Expand Down
4 changes: 2 additions & 2 deletions common/archiver/archivalMetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"strings"

"github.com/uber/cadence/common"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/types"
)

Expand Down
2 changes: 1 addition & 1 deletion common/archiver/filestore/historyArchiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ import (
"github.com/uber/cadence/common"
"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/backoff"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/persistence"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/types"
"github.com/uber/cadence/common/util"
)
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/filestore/historyArchiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (

"github.com/uber/cadence/common"
"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/types"
"github.com/uber/cadence/common/util"
)
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/filestore/visibilityArchiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (

"github.com/uber/cadence/common"
"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/types"
"github.com/uber/cadence/common/util"
)
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/filestore/visibilityArchiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import (

"github.com/uber/cadence/common"
"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/types"
"github.com/uber/cadence/common/util"
)
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/gcloud/connector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"google.golang.org/api/iterator"

"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/gcloud/connector/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/archiver/gcloud/connector"
"github.com/uber/cadence/common/archiver/gcloud/connector/mocks"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
)

func (s *clientSuite) SetupTest() {
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/gcloud/historyArchiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/archiver/gcloud/connector"
"github.com/uber/cadence/common/backoff"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/metrics"
"github.com/uber/cadence/common/persistence"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/types"
)

Expand Down
2 changes: 1 addition & 1 deletion common/archiver/gcloud/visibilityArchiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/archiver/gcloud/connector"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/metrics"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/types"
)

Expand Down
2 changes: 1 addition & 1 deletion common/archiver/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/archiver/filestore"
"github.com/uber/cadence/common/archiver/s3store"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion common/archiver/s3store/historyArchiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import (
"github.com/uber/cadence/common"
"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/backoff"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/metrics"
"github.com/uber/cadence/common/persistence"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/types"
)

Expand Down
2 changes: 1 addition & 1 deletion common/archiver/s3store/visibilityArchiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (
"github.com/aws/aws-sdk-go/service/s3/s3iface"

"github.com/uber/cadence/common/archiver"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/types"
)

Expand Down
2 changes: 1 addition & 1 deletion common/blobstore/filestore/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"os"

"github.com/uber/cadence/common/blobstore"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/util"
)

Expand Down
2 changes: 1 addition & 1 deletion common/blobstore/filestore/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"github.com/stretchr/testify/suite"

"github.com/uber/cadence/common/blobstore"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/util"
)

Expand Down
2 changes: 1 addition & 1 deletion common/cache/domainCache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import (
"github.com/uber/cadence/common"
"github.com/uber/cadence/common/clock"
"github.com/uber/cadence/common/cluster"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/metrics"
"github.com/uber/cadence/common/mocks"
"github.com/uber/cadence/common/persistence"
"github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/common/types"
)

Expand Down
4 changes: 2 additions & 2 deletions common/cluster/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"fmt"

"github.com/uber/cadence/common"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/service/dynamicconfig"
)

type (
Expand Down
4 changes: 2 additions & 2 deletions common/cluster/metadataTest.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ package cluster

import (
"github.com/uber/cadence/common"
"github.com/uber/cadence/common/config"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/service/config"
"github.com/uber/cadence/common/service/dynamicconfig"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion common/cluster/metadata_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (

"github.com/uber/cadence/common"
"github.com/uber/cadence/common/auth"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/persistence/nosql/nosqlplugin/cassandra/gocql"
"github.com/uber/cadence/common/service/dynamicconfig"
)

type (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

func TestToString(t *testing.T) {
var cfg Config
err := Load("", "../../../config", "", &cfg)
err := Load("", "../../config", "", &cfg)
assert.NoError(t, err)
assert.NotEmpty(t, cfg.String())
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion common/domain/failover_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import (
"github.com/uber/cadence/common/backoff"
"github.com/uber/cadence/common/cache"
"github.com/uber/cadence/common/clock"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/metrics"
"github.com/uber/cadence/common/persistence"
"github.com/uber/cadence/common/service/dynamicconfig"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion common/domain/failover_watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ import (
"github.com/uber/cadence/common"
"github.com/uber/cadence/common/cache"
"github.com/uber/cadence/common/clock"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/metrics"
"github.com/uber/cadence/common/mocks"
"github.com/uber/cadence/common/persistence"
"github.com/uber/cadence/common/service/dynamicconfig"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion common/domain/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ import (
"github.com/uber/cadence/common/archiver/provider"
"github.com/uber/cadence/common/clock"
"github.com/uber/cadence/common/cluster"
"github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log"
"github.com/uber/cadence/common/log/tag"
"github.com/uber/cadence/common/persistence"
"github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/common/types"
)

Expand Down
4 changes: 2 additions & 2 deletions common/domain/handler_GlobalDomainDisabled_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ import (
"github.com/uber/cadence/common/archiver/provider"
"github.com/uber/cadence/common/clock"
"github.com/uber/cadence/common/cluster"
"github.com/uber/cadence/common/config"
dc "github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/mocks"
"github.com/uber/cadence/common/persistence"
persistencetests "github.com/uber/cadence/common/persistence/persistence-tests"
"github.com/uber/cadence/common/service/config"
dc "github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/common/types"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ import (
"github.com/uber/cadence/common/archiver/provider"
"github.com/uber/cadence/common/clock"
"github.com/uber/cadence/common/cluster"
"github.com/uber/cadence/common/config"
dc "github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/mocks"
"github.com/uber/cadence/common/persistence"
persistencetests "github.com/uber/cadence/common/persistence/persistence-tests"
"github.com/uber/cadence/common/service/config"
dc "github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/common/types"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ import (
"github.com/uber/cadence/common/archiver/provider"
"github.com/uber/cadence/common/clock"
"github.com/uber/cadence/common/cluster"
"github.com/uber/cadence/common/config"
dc "github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/mocks"
"github.com/uber/cadence/common/persistence"
persistencetests "github.com/uber/cadence/common/persistence/persistence-tests"
"github.com/uber/cadence/common/service/config"
dc "github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/common/types"
)

Expand Down
4 changes: 2 additions & 2 deletions common/domain/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ import (
"github.com/uber/cadence/common/archiver/provider"
"github.com/uber/cadence/common/clock"
"github.com/uber/cadence/common/cluster"
"github.com/uber/cadence/common/config"
dc "github.com/uber/cadence/common/dynamicconfig"
"github.com/uber/cadence/common/log/loggerimpl"
"github.com/uber/cadence/common/mocks"
"github.com/uber/cadence/common/persistence"
persistencetests "github.com/uber/cadence/common/persistence/persistence-tests"
"github.com/uber/cadence/common/service/config"
dc "github.com/uber/cadence/common/service/dynamicconfig"
"github.com/uber/cadence/common/types"
)

Expand Down
Loading

0 comments on commit b031307

Please sign in to comment.