Skip to content

Commit cae4e50

Browse files
committed
Rename domain to namespace.
1 parent 2204d19 commit cae4e50

File tree

15 files changed

+2692
-2690
lines changed

15 files changed

+2692
-2690
lines changed

common/decision.pb.go

Lines changed: 144 additions & 144 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/history.pb.go

Lines changed: 420 additions & 419 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 432 additions & 432 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/workflow_execution.pb.go

Lines changed: 115 additions & 115 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enums/enums.pb.go

Lines changed: 166 additions & 166 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

failure/failure.pb.go

Lines changed: 134 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

serviceerror/convert.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ func FromStatus(st *status.Status) error {
103103
}
104104
case codes.AlreadyExists:
105105
switch f := f.(type) {
106-
case *failure.DomainAlreadyExists:
107-
return newDomainAlreadyExists(st)
106+
case *failure.NamespaceAlreadyExists:
107+
return newNamespaceAlreadyExists(st)
108108
case *failure.WorkflowExecutionAlreadyStarted:
109109
return newWorkflowExecutionAlreadyStarted(st, f)
110110
case *failure.CancellationAlreadyRequested:
@@ -114,8 +114,8 @@ func FromStatus(st *status.Status) error {
114114
}
115115
case codes.FailedPrecondition:
116116
switch f := f.(type) {
117-
case *failure.DomainNotActive:
118-
return newDomainNotActive(st, f)
117+
case *failure.NamespaceNotActive:
118+
return newNamespaceNotActive(st, f)
119119
case *failure.ClientVersionNotSupported:
120120
return newClientVersionNotSupported(st, f)
121121
case *failure.FeatureVersionNotSupported:
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,39 @@ import (
3030
)
3131

3232
type (
33-
// DomainAlreadyExists represents domain already exists error.
34-
DomainAlreadyExists struct {
33+
// NamespaceAlreadyExists represents namespace already exists error.
34+
NamespaceAlreadyExists struct {
3535
Message string
3636
st *status.Status
3737
}
3838
)
3939

40-
// NewDomainAlreadyExists returns new DomainAlreadyExists error.
41-
func NewDomainAlreadyExists(message string) *DomainAlreadyExists {
42-
return &DomainAlreadyExists{
40+
// NewNamespaceAlreadyExists returns new NamespaceAlreadyExists error.
41+
func NewNamespaceAlreadyExists(message string) *NamespaceAlreadyExists {
42+
return &NamespaceAlreadyExists{
4343
Message: message,
4444
}
4545
}
4646

4747
// Error returns string message.
48-
func (e *DomainAlreadyExists) Error() string {
48+
func (e *NamespaceAlreadyExists) Error() string {
4949
return e.Message
5050
}
5151

52-
func (e *DomainAlreadyExists) status() *status.Status {
52+
func (e *NamespaceAlreadyExists) status() *status.Status {
5353
if e.st != nil {
5454
return e.st
5555
}
5656

5757
st := status.New(codes.AlreadyExists, e.Message)
5858
st, _ = st.WithDetails(
59-
&failure.DomainAlreadyExists{},
59+
&failure.NamespaceAlreadyExists{},
6060
)
6161
return st
6262
}
6363

64-
func newDomainAlreadyExists(st *status.Status) *DomainAlreadyExists {
65-
return &DomainAlreadyExists{
64+
func newNamespaceAlreadyExists(st *status.Status) *NamespaceAlreadyExists {
65+
return &NamespaceAlreadyExists{
6666
Message: st.Message(),
6767
st: st,
6868
}
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,56 +32,56 @@ import (
3232
)
3333

3434
type (
35-
// DomainNotActive represents domain not active error.
36-
DomainNotActive struct {
35+
// NamespaceNotActive represents namespace not active error.
36+
NamespaceNotActive struct {
3737
Message string
38-
DomainName string
38+
Namespace string
3939
CurrentCluster string
4040
ActiveCluster string
4141
st *status.Status
4242
}
4343
)
4444

45-
// NewDomainNotActive returns new DomainNotActive error.
46-
func NewDomainNotActive(domainName, currentCluster, activeCluster string) *DomainNotActive {
47-
return &DomainNotActive{
45+
// NewNamespaceNotActive returns new NamespaceNotActive error.
46+
func NewNamespaceNotActive(namespace, currentCluster, activeCluster string) *NamespaceNotActive {
47+
return &NamespaceNotActive{
4848
Message: fmt.Sprintf(
49-
"Domain: %s is active in cluster: %s, while current cluster %s is a standby cluster.",
50-
domainName,
49+
"Namespace: %s is active in cluster: %s, while current cluster %s is a standby cluster.",
50+
namespace,
5151
activeCluster,
5252
currentCluster,
5353
),
54-
DomainName: domainName,
54+
Namespace: namespace,
5555
CurrentCluster: currentCluster,
5656
ActiveCluster: activeCluster,
5757
}
5858
}
5959

6060
// Error returns string message.
61-
func (e *DomainNotActive) Error() string {
61+
func (e *NamespaceNotActive) Error() string {
6262
return e.Message
6363
}
6464

65-
func (e *DomainNotActive) status() *status.Status {
65+
func (e *NamespaceNotActive) status() *status.Status {
6666
if e.st != nil {
6767
return e.st
6868
}
6969

7070
st := status.New(codes.FailedPrecondition, e.Message)
7171
st, _ = st.WithDetails(
72-
&failure.DomainNotActive{
73-
DomainName: e.DomainName,
72+
&failure.NamespaceNotActive{
73+
Namespace: e.Namespace,
7474
CurrentCluster: e.CurrentCluster,
7575
ActiveCluster: e.ActiveCluster,
7676
},
7777
)
7878
return st
7979
}
8080

81-
func newDomainNotActive(st *status.Status, failure *failure.DomainNotActive) *DomainNotActive {
82-
return &DomainNotActive{
81+
func newNamespaceNotActive(st *status.Status, failure *failure.NamespaceNotActive) *NamespaceNotActive {
82+
return &NamespaceNotActive{
8383
Message: st.Message(),
84-
DomainName: failure.DomainName,
84+
Namespace: failure.Namespace,
8585
CurrentCluster: failure.CurrentCluster,
8686
ActiveCluster: failure.ActiveCluster,
8787
st: st,

serviceerror/retryTask.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type (
3333
// RetryTask represents retry task error.
3434
RetryTask struct {
3535
Message string
36-
DomainId string
36+
NamespaceId string
3737
WorkflowId string
3838
RunId string
3939
NextEventId int64
@@ -42,10 +42,10 @@ type (
4242
)
4343

4444
// NewRetryTask returns new RetryTask error.
45-
func NewRetryTask(message, domainId, workflowId, runId string, nextEventId int64) *RetryTask {
45+
func NewRetryTask(message, namespaceId, workflowId, runId string, nextEventId int64) *RetryTask {
4646
return &RetryTask{
4747
Message: message,
48-
DomainId: domainId,
48+
NamespaceId: namespaceId,
4949
WorkflowId: workflowId,
5050
RunId: runId,
5151
NextEventId: nextEventId,
@@ -65,7 +65,7 @@ func (e *RetryTask) status() *status.Status {
6565
st := status.New(codes.Aborted, e.Message)
6666
st, _ = st.WithDetails(
6767
&failure.RetryTask{
68-
DomainId: e.DomainId,
68+
NamespaceId: e.NamespaceId,
6969
WorkflowId: e.WorkflowId,
7070
RunId: e.RunId,
7171
NextEventId: e.NextEventId,
@@ -77,7 +77,7 @@ func (e *RetryTask) status() *status.Status {
7777
func newRetryTask(st *status.Status, failure *failure.RetryTask) *RetryTask {
7878
return &RetryTask{
7979
Message: st.Message(),
80-
DomainId: failure.DomainId,
80+
NamespaceId: failure.NamespaceId,
8181
WorkflowId: failure.WorkflowId,
8282
RunId: failure.RunId,
8383
NextEventId: failure.NextEventId,

0 commit comments

Comments
 (0)