Documentation ¶
Overview ¶
Package client is a generated GoMock package.
Index ¶
- Constants
- Variables
- func FeatureFlagsHeader(featureFlags shared.FeatureFlags) string
- func GetFeatureFlagsFromHeader(call *yarpc.Call) shared.FeatureFlags
- func ToClientFeatureFlags(featureFlags *shared.FeatureFlags) client.FeatureFlags
- type MockVersionChecker
- func (m *MockVersionChecker) ClientSupported(arg0 context.Context, arg1 bool) error
- func (m *MockVersionChecker) EXPECT() *MockVersionCheckerMockRecorder
- func (m *MockVersionChecker) SupportsConsistentQuery(arg0, arg1 string) error
- func (m *MockVersionChecker) SupportsRawHistoryQuery(arg0, arg1 string) error
- func (m *MockVersionChecker) SupportsStickyQuery(arg0, arg1 string) error
- func (m *MockVersionChecker) SupportsWorkflowAlreadyCompletedError(arg0, arg1 string, arg2 shared.FeatureFlags) error
- type MockVersionCheckerMockRecorder
- func (mr *MockVersionCheckerMockRecorder) ClientSupported(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockVersionCheckerMockRecorder) SupportsConsistentQuery(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockVersionCheckerMockRecorder) SupportsRawHistoryQuery(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockVersionCheckerMockRecorder) SupportsStickyQuery(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockVersionCheckerMockRecorder) SupportsWorkflowAlreadyCompletedError(arg0, arg1, arg2 interface{}) *gomock.Call
- type VersionChecker
Constants ¶
const ( // GoSDK is the header value for common.ClientImplHeaderName indicating a go sdk client GoSDK = "uber-go" // JavaSDK is the header value for common.ClientImplHeaderName indicating a java sdk client JavaSDK = "uber-java" // CLI is the header value for common.ClientImplHeaderName indicating a cli client CLI = "cli" // SupportedGoSDKVersion indicates the highest go sdk version server will accept requests from SupportedGoSDKVersion = "1.7.0" // SupportedJavaSDKVersion indicates the highest java sdk version server will accept requests from SupportedJavaSDKVersion = "1.5.0" // SupportedCLIVersion indicates the highest cli version server will accept requests from SupportedCLIVersion = "1.7.0" // StickyQueryUnknownImplConstraints indicates the minimum client version of an unknown client type which supports StickyQuery StickyQueryUnknownImplConstraints = "1.0.0" // GoWorkerStickyQueryVersion indicates the minimum client version of go worker which supports StickyQuery GoWorkerStickyQueryVersion = "1.0.0" // JavaWorkerStickyQueryVersion indicates the minimum client version of the java worker which supports StickyQuery JavaWorkerStickyQueryVersion = "1.0.0" // GoWorkerConsistentQueryVersion indicates the minimum client version of the go worker which supports ConsistentQuery GoWorkerConsistentQueryVersion = "1.5.0" // JavaWorkerRawHistoryQueryVersion indicates the minimum client version of the java worker which supports RawHistoryQuery JavaWorkerRawHistoryQueryVersion = "1.3.0" // JavaWorkerConsistentQueryVersion indicates the minimum client version of the java worker which supports ConsistentQuery JavaWorkerConsistentQueryVersion = "1.5.0" // GoWorkerRawHistoryQueryVersion indicates the minimum client version of the go worker which supports RawHistoryQuery GoWorkerRawHistoryQueryVersion = "1.6.0" // CLIRawHistoryQueryVersion indicates the minimum CLI version of the go worker which supports RawHistoryQuery // Note: cli uses go client feature version CLIRawHistoryQueryVersion = "1.6.0" // Go Client version that supports WorkflowExecutionAlreadyCompleted Error CLIWorkflowAlreadyCompletedVersion = "1.7.0" // Go Client version that supports WorkflowExecutionAlreadyCompleted Error GoWorkerWorkflowAlreadyCompletedVersion = "1.7.0" // Java Client version that supports WorkflowExecutionAlreadyCompleted Error JavaWorkflowAlreadyCompletedVersion = "1.4.0" )
Variables ¶
var ( // ErrUnknownFeature indicates that requested feature is not known by version checker ErrUnknownFeature = &types.BadRequestError{Message: "Unknown feature"} // DefaultCLIFeatureFlags is the default FeatureFlags used by Cadence CLI DefaultCLIFeatureFlags = shared.FeatureFlags{ WorkflowExecutionAlreadyCompletedErrorEnabled: common.BoolPtr(true), } )
Functions ¶
func FeatureFlagsHeader ¶ added in v0.22.0
func FeatureFlagsHeader(featureFlags shared.FeatureFlags) string
FeatureFlagsHeader returns the serialized version of the FeatureFlags
func GetFeatureFlagsFromHeader ¶ added in v0.22.0
func GetFeatureFlagsFromHeader(call *yarpc.Call) shared.FeatureFlags
GetFeatureFlagsFromHeader returns FeatureFlags from yarpc headers
func ToClientFeatureFlags ¶ added in v0.22.0
func ToClientFeatureFlags(featureFlags *shared.FeatureFlags) client.FeatureFlags
ToClientFeatureFlags returns Cadence client FeatureFlags version of idl.FeatureFlags
Types ¶
type MockVersionChecker ¶
type MockVersionChecker struct {
// contains filtered or unexported fields
}
MockVersionChecker is a mock of VersionChecker interface.
func NewMockVersionChecker ¶ added in v0.15.0
func NewMockVersionChecker(ctrl *gomock.Controller) *MockVersionChecker
NewMockVersionChecker creates a new mock instance.
func (*MockVersionChecker) ClientSupported ¶
func (m *MockVersionChecker) ClientSupported(arg0 context.Context, arg1 bool) error
ClientSupported mocks base method.
func (*MockVersionChecker) EXPECT ¶
func (m *MockVersionChecker) EXPECT() *MockVersionCheckerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockVersionChecker) SupportsConsistentQuery ¶
func (m *MockVersionChecker) SupportsConsistentQuery(arg0, arg1 string) error
SupportsConsistentQuery mocks base method.
func (*MockVersionChecker) SupportsRawHistoryQuery ¶
func (m *MockVersionChecker) SupportsRawHistoryQuery(arg0, arg1 string) error
SupportsRawHistoryQuery mocks base method.
func (*MockVersionChecker) SupportsStickyQuery ¶
func (m *MockVersionChecker) SupportsStickyQuery(arg0, arg1 string) error
SupportsStickyQuery mocks base method.
func (*MockVersionChecker) SupportsWorkflowAlreadyCompletedError ¶
func (m *MockVersionChecker) SupportsWorkflowAlreadyCompletedError(arg0, arg1 string, arg2 shared.FeatureFlags) error
SupportsWorkflowAlreadyCompletedError mocks base method.
type MockVersionCheckerMockRecorder ¶ added in v0.15.0
type MockVersionCheckerMockRecorder struct {
// contains filtered or unexported fields
}
MockVersionCheckerMockRecorder is the mock recorder for MockVersionChecker.
func (*MockVersionCheckerMockRecorder) ClientSupported ¶ added in v0.15.0
func (mr *MockVersionCheckerMockRecorder) ClientSupported(arg0, arg1 interface{}) *gomock.Call
ClientSupported indicates an expected call of ClientSupported.
func (*MockVersionCheckerMockRecorder) SupportsConsistentQuery ¶ added in v0.15.0
func (mr *MockVersionCheckerMockRecorder) SupportsConsistentQuery(arg0, arg1 interface{}) *gomock.Call
SupportsConsistentQuery indicates an expected call of SupportsConsistentQuery.
func (*MockVersionCheckerMockRecorder) SupportsRawHistoryQuery ¶ added in v0.15.0
func (mr *MockVersionCheckerMockRecorder) SupportsRawHistoryQuery(arg0, arg1 interface{}) *gomock.Call
SupportsRawHistoryQuery indicates an expected call of SupportsRawHistoryQuery.
func (*MockVersionCheckerMockRecorder) SupportsStickyQuery ¶ added in v0.15.0
func (mr *MockVersionCheckerMockRecorder) SupportsStickyQuery(arg0, arg1 interface{}) *gomock.Call
SupportsStickyQuery indicates an expected call of SupportsStickyQuery.
func (*MockVersionCheckerMockRecorder) SupportsWorkflowAlreadyCompletedError ¶ added in v0.21.0
func (mr *MockVersionCheckerMockRecorder) SupportsWorkflowAlreadyCompletedError(arg0, arg1, arg2 interface{}) *gomock.Call
SupportsWorkflowAlreadyCompletedError indicates an expected call of SupportsWorkflowAlreadyCompletedError.
type VersionChecker ¶ added in v0.11.0
type VersionChecker interface { ClientSupported(ctx context.Context, enableClientVersionCheck bool) error SupportsStickyQuery(clientImpl string, clientFeatureVersion string) error SupportsConsistentQuery(clientImpl string, clientFeatureVersion string) error SupportsRawHistoryQuery(clientImpl string, clientFeatureVersion string) error SupportsWorkflowAlreadyCompletedError(clientImpl string, clientFeatureVersion string, featureFlags shared.FeatureFlags) error }
VersionChecker is used to check client/server compatibility and client's capabilities
func NewVersionChecker ¶ added in v0.11.0
func NewVersionChecker() VersionChecker
NewVersionChecker constructs a new VersionChecker