Skip to content

Commit

Permalink
Explicitly list client interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
vytautas-karpavicius committed Oct 27, 2020
1 parent dea34b8 commit fa4f11f
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 8 deletions.
29 changes: 27 additions & 2 deletions client/admin/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,34 @@

package admin

import "github.com/uber/cadence/.gen/go/admin/adminserviceclient"
import (
"context"

"go.uber.org/yarpc"

"github.com/uber/cadence/.gen/go/admin"
"github.com/uber/cadence/.gen/go/replicator"
"github.com/uber/cadence/.gen/go/shared"
)

// Client is the interface exposed by admin service client
type Client interface {
adminserviceclient.Interface
AddSearchAttribute(context.Context, *admin.AddSearchAttributeRequest, ...yarpc.CallOption) error
CloseShard(context.Context, *shared.CloseShardRequest, ...yarpc.CallOption) error
DescribeCluster(context.Context, ...yarpc.CallOption) (*admin.DescribeClusterResponse, error)
DescribeHistoryHost(context.Context, *shared.DescribeHistoryHostRequest, ...yarpc.CallOption) (*shared.DescribeHistoryHostResponse, error)
DescribeQueue(context.Context, *shared.DescribeQueueRequest, ...yarpc.CallOption) (*shared.DescribeQueueResponse, error)
DescribeWorkflowExecution(context.Context, *admin.DescribeWorkflowExecutionRequest, ...yarpc.CallOption) (*admin.DescribeWorkflowExecutionResponse, error)
GetDLQReplicationMessages(context.Context, *replicator.GetDLQReplicationMessagesRequest, ...yarpc.CallOption) (*replicator.GetDLQReplicationMessagesResponse, error)
GetDomainReplicationMessages(context.Context, *replicator.GetDomainReplicationMessagesRequest, ...yarpc.CallOption) (*replicator.GetDomainReplicationMessagesResponse, error)
GetReplicationMessages(context.Context, *replicator.GetReplicationMessagesRequest, ...yarpc.CallOption) (*replicator.GetReplicationMessagesResponse, error)
GetWorkflowExecutionRawHistoryV2(context.Context, *admin.GetWorkflowExecutionRawHistoryV2Request, ...yarpc.CallOption) (*admin.GetWorkflowExecutionRawHistoryV2Response, error)
MergeDLQMessages(context.Context, *replicator.MergeDLQMessagesRequest, ...yarpc.CallOption) (*replicator.MergeDLQMessagesResponse, error)
PurgeDLQMessages(context.Context, *replicator.PurgeDLQMessagesRequest, ...yarpc.CallOption) error
ReadDLQMessages(context.Context, *replicator.ReadDLQMessagesRequest, ...yarpc.CallOption) (*replicator.ReadDLQMessagesResponse, error)
ReapplyEvents(context.Context, *shared.ReapplyEventsRequest, ...yarpc.CallOption) error
RefreshWorkflowTasks(context.Context, *shared.RefreshWorkflowTasksRequest, ...yarpc.CallOption) error
RemoveTask(context.Context, *shared.RemoveTaskRequest, ...yarpc.CallOption) error
ResendReplicationTasks(context.Context, *admin.ResendReplicationTasksRequest, ...yarpc.CallOption) error
ResetQueue(context.Context, *shared.ResetQueueRequest, ...yarpc.CallOption) error
}
45 changes: 43 additions & 2 deletions client/frontend/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,51 @@
package frontend

import (
"github.com/uber/cadence/.gen/go/cadence/workflowserviceclient"
"context"

"go.uber.org/yarpc"

"github.com/uber/cadence/.gen/go/shared"
)

// Client is the interface exposed by frontend service client
type Client interface {
workflowserviceclient.Interface
CountWorkflowExecutions(context.Context, *shared.CountWorkflowExecutionsRequest, ...yarpc.CallOption) (*shared.CountWorkflowExecutionsResponse, error)
DeprecateDomain(context.Context, *shared.DeprecateDomainRequest, ...yarpc.CallOption) error
DescribeDomain(context.Context, *shared.DescribeDomainRequest, ...yarpc.CallOption) (*shared.DescribeDomainResponse, error)
DescribeTaskList(context.Context, *shared.DescribeTaskListRequest, ...yarpc.CallOption) (*shared.DescribeTaskListResponse, error)
DescribeWorkflowExecution(context.Context, *shared.DescribeWorkflowExecutionRequest, ...yarpc.CallOption) (*shared.DescribeWorkflowExecutionResponse, error)
GetClusterInfo(context.Context, ...yarpc.CallOption) (*shared.ClusterInfo, error)
GetSearchAttributes(context.Context, ...yarpc.CallOption) (*shared.GetSearchAttributesResponse, error)
GetWorkflowExecutionHistory(context.Context, *shared.GetWorkflowExecutionHistoryRequest, ...yarpc.CallOption) (*shared.GetWorkflowExecutionHistoryResponse, error)
ListArchivedWorkflowExecutions(context.Context, *shared.ListArchivedWorkflowExecutionsRequest, ...yarpc.CallOption) (*shared.ListArchivedWorkflowExecutionsResponse, error)
ListClosedWorkflowExecutions(context.Context, *shared.ListClosedWorkflowExecutionsRequest, ...yarpc.CallOption) (*shared.ListClosedWorkflowExecutionsResponse, error)
ListDomains(context.Context, *shared.ListDomainsRequest, ...yarpc.CallOption) (*shared.ListDomainsResponse, error)
ListOpenWorkflowExecutions(context.Context, *shared.ListOpenWorkflowExecutionsRequest, ...yarpc.CallOption) (*shared.ListOpenWorkflowExecutionsResponse, error)
ListTaskListPartitions(context.Context, *shared.ListTaskListPartitionsRequest, ...yarpc.CallOption) (*shared.ListTaskListPartitionsResponse, error)
ListWorkflowExecutions(context.Context, *shared.ListWorkflowExecutionsRequest, ...yarpc.CallOption) (*shared.ListWorkflowExecutionsResponse, error)
PollForActivityTask(context.Context, *shared.PollForActivityTaskRequest, ...yarpc.CallOption) (*shared.PollForActivityTaskResponse, error)
PollForDecisionTask(context.Context, *shared.PollForDecisionTaskRequest, ...yarpc.CallOption) (*shared.PollForDecisionTaskResponse, error)
QueryWorkflow(context.Context, *shared.QueryWorkflowRequest, ...yarpc.CallOption) (*shared.QueryWorkflowResponse, error)
RecordActivityTaskHeartbeat(context.Context, *shared.RecordActivityTaskHeartbeatRequest, ...yarpc.CallOption) (*shared.RecordActivityTaskHeartbeatResponse, error)
RecordActivityTaskHeartbeatByID(context.Context, *shared.RecordActivityTaskHeartbeatByIDRequest, ...yarpc.CallOption) (*shared.RecordActivityTaskHeartbeatResponse, error)
RegisterDomain(context.Context, *shared.RegisterDomainRequest, ...yarpc.CallOption) error
RequestCancelWorkflowExecution(context.Context, *shared.RequestCancelWorkflowExecutionRequest, ...yarpc.CallOption) error
ResetStickyTaskList(context.Context, *shared.ResetStickyTaskListRequest, ...yarpc.CallOption) (*shared.ResetStickyTaskListResponse, error)
ResetWorkflowExecution(context.Context, *shared.ResetWorkflowExecutionRequest, ...yarpc.CallOption) (*shared.ResetWorkflowExecutionResponse, error)
RespondActivityTaskCanceled(context.Context, *shared.RespondActivityTaskCanceledRequest, ...yarpc.CallOption) error
RespondActivityTaskCanceledByID(context.Context, *shared.RespondActivityTaskCanceledByIDRequest, ...yarpc.CallOption) error
RespondActivityTaskCompleted(context.Context, *shared.RespondActivityTaskCompletedRequest, ...yarpc.CallOption) error
RespondActivityTaskCompletedByID(context.Context, *shared.RespondActivityTaskCompletedByIDRequest, ...yarpc.CallOption) error
RespondActivityTaskFailed(context.Context, *shared.RespondActivityTaskFailedRequest, ...yarpc.CallOption) error
RespondActivityTaskFailedByID(context.Context, *shared.RespondActivityTaskFailedByIDRequest, ...yarpc.CallOption) error
RespondDecisionTaskCompleted(context.Context, *shared.RespondDecisionTaskCompletedRequest, ...yarpc.CallOption) (*shared.RespondDecisionTaskCompletedResponse, error)
RespondDecisionTaskFailed(context.Context, *shared.RespondDecisionTaskFailedRequest, ...yarpc.CallOption) error
RespondQueryTaskCompleted(context.Context, *shared.RespondQueryTaskCompletedRequest, ...yarpc.CallOption) error
ScanWorkflowExecutions(context.Context, *shared.ListWorkflowExecutionsRequest, ...yarpc.CallOption) (*shared.ListWorkflowExecutionsResponse, error)
SignalWithStartWorkflowExecution(context.Context, *shared.SignalWithStartWorkflowExecutionRequest, ...yarpc.CallOption) (*shared.StartWorkflowExecutionResponse, error)
SignalWorkflowExecution(context.Context, *shared.SignalWorkflowExecutionRequest, ...yarpc.CallOption) error
StartWorkflowExecution(context.Context, *shared.StartWorkflowExecutionRequest, ...yarpc.CallOption) (*shared.StartWorkflowExecutionResponse, error)
TerminateWorkflowExecution(context.Context, *shared.TerminateWorkflowExecutionRequest, ...yarpc.CallOption) error
UpdateDomain(context.Context, *shared.UpdateDomainRequest, ...yarpc.CallOption) (*shared.UpdateDomainResponse, error)
}
48 changes: 46 additions & 2 deletions client/history/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,54 @@
package history

import (
"github.com/uber/cadence/.gen/go/history/historyserviceclient"
"context"

"go.uber.org/yarpc"

"github.com/uber/cadence/.gen/go/history"
"github.com/uber/cadence/.gen/go/replicator"
"github.com/uber/cadence/.gen/go/shared"
)

// Client is the interface exposed by history service client
type Client interface {
historyserviceclient.Interface
CloseShard(context.Context, *shared.CloseShardRequest, ...yarpc.CallOption) error
DescribeHistoryHost(context.Context, *shared.DescribeHistoryHostRequest, ...yarpc.CallOption) (*shared.DescribeHistoryHostResponse, error)
DescribeMutableState(context.Context, *history.DescribeMutableStateRequest, ...yarpc.CallOption) (*history.DescribeMutableStateResponse, error)
DescribeQueue(context.Context, *shared.DescribeQueueRequest, ...yarpc.CallOption) (*shared.DescribeQueueResponse, error)
DescribeWorkflowExecution(context.Context, *history.DescribeWorkflowExecutionRequest, ...yarpc.CallOption) (*shared.DescribeWorkflowExecutionResponse, error)
GetDLQReplicationMessages(context.Context, *replicator.GetDLQReplicationMessagesRequest, ...yarpc.CallOption) (*replicator.GetDLQReplicationMessagesResponse, error)
GetMutableState(context.Context, *history.GetMutableStateRequest, ...yarpc.CallOption) (*history.GetMutableStateResponse, error)
GetReplicationMessages(context.Context, *replicator.GetReplicationMessagesRequest, ...yarpc.CallOption) (*replicator.GetReplicationMessagesResponse, error)
MergeDLQMessages(context.Context, *replicator.MergeDLQMessagesRequest, ...yarpc.CallOption) (*replicator.MergeDLQMessagesResponse, error)
NotifyFailoverMarkers(context.Context, *history.NotifyFailoverMarkersRequest, ...yarpc.CallOption) error
PollMutableState(context.Context, *history.PollMutableStateRequest, ...yarpc.CallOption) (*history.PollMutableStateResponse, error)
PurgeDLQMessages(context.Context, *replicator.PurgeDLQMessagesRequest, ...yarpc.CallOption) error
QueryWorkflow(context.Context, *history.QueryWorkflowRequest, ...yarpc.CallOption) (*history.QueryWorkflowResponse, error)
ReadDLQMessages(context.Context, *replicator.ReadDLQMessagesRequest, ...yarpc.CallOption) (*replicator.ReadDLQMessagesResponse, error)
ReapplyEvents(context.Context, *history.ReapplyEventsRequest, ...yarpc.CallOption) error
RecordActivityTaskHeartbeat(context.Context, *history.RecordActivityTaskHeartbeatRequest, ...yarpc.CallOption) (*shared.RecordActivityTaskHeartbeatResponse, error)
RecordActivityTaskStarted(context.Context, *history.RecordActivityTaskStartedRequest, ...yarpc.CallOption) (*history.RecordActivityTaskStartedResponse, error)
RecordChildExecutionCompleted(context.Context, *history.RecordChildExecutionCompletedRequest, ...yarpc.CallOption) error
RecordDecisionTaskStarted(context.Context, *history.RecordDecisionTaskStartedRequest, ...yarpc.CallOption) (*history.RecordDecisionTaskStartedResponse, error)
RefreshWorkflowTasks(context.Context, *history.RefreshWorkflowTasksRequest, ...yarpc.CallOption) error
RemoveSignalMutableState(context.Context, *history.RemoveSignalMutableStateRequest, ...yarpc.CallOption) error
RemoveTask(context.Context, *shared.RemoveTaskRequest, ...yarpc.CallOption) error
ReplicateEventsV2(context.Context, *history.ReplicateEventsV2Request, ...yarpc.CallOption) error
RequestCancelWorkflowExecution(context.Context, *history.RequestCancelWorkflowExecutionRequest, ...yarpc.CallOption) error
ResetQueue(context.Context, *shared.ResetQueueRequest, ...yarpc.CallOption) error
ResetStickyTaskList(context.Context, *history.ResetStickyTaskListRequest, ...yarpc.CallOption) (*history.ResetStickyTaskListResponse, error)
ResetWorkflowExecution(context.Context, *history.ResetWorkflowExecutionRequest, ...yarpc.CallOption) (*shared.ResetWorkflowExecutionResponse, error)
RespondActivityTaskCanceled(context.Context, *history.RespondActivityTaskCanceledRequest, ...yarpc.CallOption) error
RespondActivityTaskCompleted(context.Context, *history.RespondActivityTaskCompletedRequest, ...yarpc.CallOption) error
RespondActivityTaskFailed(context.Context, *history.RespondActivityTaskFailedRequest, ...yarpc.CallOption) error
RespondDecisionTaskCompleted(context.Context, *history.RespondDecisionTaskCompletedRequest, ...yarpc.CallOption) (*history.RespondDecisionTaskCompletedResponse, error)
RespondDecisionTaskFailed(context.Context, *history.RespondDecisionTaskFailedRequest, ...yarpc.CallOption) error
ScheduleDecisionTask(context.Context, *history.ScheduleDecisionTaskRequest, ...yarpc.CallOption) error
SignalWithStartWorkflowExecution(context.Context, *history.SignalWithStartWorkflowExecutionRequest, ...yarpc.CallOption) (*shared.StartWorkflowExecutionResponse, error)
SignalWorkflowExecution(context.Context, *history.SignalWorkflowExecutionRequest, ...yarpc.CallOption) error
StartWorkflowExecution(context.Context, *history.StartWorkflowExecutionRequest, ...yarpc.CallOption) (*shared.StartWorkflowExecutionResponse, error)
SyncActivity(context.Context, *history.SyncActivityRequest, ...yarpc.CallOption) error
SyncShardStatus(context.Context, *history.SyncShardStatusRequest, ...yarpc.CallOption) error
TerminateWorkflowExecution(context.Context, *history.TerminateWorkflowExecutionRequest, ...yarpc.CallOption) error
}
17 changes: 15 additions & 2 deletions client/matching/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,23 @@
package matching

import (
"github.com/uber/cadence/.gen/go/matching/matchingserviceclient"
"context"

"go.uber.org/yarpc"

"github.com/uber/cadence/.gen/go/matching"
"github.com/uber/cadence/.gen/go/shared"
)

// Client is the interface exposed by matching service client
type Client interface {
matchingserviceclient.Interface
AddActivityTask(context.Context, *matching.AddActivityTaskRequest, ...yarpc.CallOption) error
AddDecisionTask(context.Context, *matching.AddDecisionTaskRequest, ...yarpc.CallOption) error
CancelOutstandingPoll(context.Context, *matching.CancelOutstandingPollRequest, ...yarpc.CallOption) error
DescribeTaskList(context.Context, *matching.DescribeTaskListRequest, ...yarpc.CallOption) (*shared.DescribeTaskListResponse, error)
ListTaskListPartitions(context.Context, *matching.ListTaskListPartitionsRequest, ...yarpc.CallOption) (*shared.ListTaskListPartitionsResponse, error)
PollForActivityTask(context.Context, *matching.PollForActivityTaskRequest, ...yarpc.CallOption) (*shared.PollForActivityTaskResponse, error)
PollForDecisionTask(context.Context, *matching.PollForDecisionTaskRequest, ...yarpc.CallOption) (*matching.PollForDecisionTaskResponse, error)
QueryWorkflow(context.Context, *matching.QueryWorkflowRequest, ...yarpc.CallOption) (*shared.QueryWorkflowResponse, error)
RespondQueryTaskCompleted(context.Context, *matching.RespondQueryTaskCompletedRequest, ...yarpc.CallOption) error
}

0 comments on commit fa4f11f

Please sign in to comment.