client

package
v1.2.14-prerelease10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 11 Imported by: 5

Documentation

Overview

Package mock_client is a generated GoMock package.

Index

Constants

View Source
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

View Source
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 MockVersionCheckerMockRecorder added in v0.15.0

type MockVersionCheckerMockRecorder struct {
	// contains filtered or unexported fields
}

MockVersionCheckerMockRecorder is the mock recorder for VersionCheckerMock

func (*MockVersionCheckerMockRecorder) ClientSupported added in v0.15.0

func (mr *MockVersionCheckerMockRecorder) ClientSupported(ctx, enableClientVersionCheck interface{}) *gomock.Call

ClientSupported indicates an expected call of ClientSupported

func (*MockVersionCheckerMockRecorder) SupportsConsistentQuery added in v0.15.0

func (mr *MockVersionCheckerMockRecorder) SupportsConsistentQuery(clientImpl, clientFeatureVersion interface{}) *gomock.Call

SupportsConsistentQuery indicates an expected call of SupportsConsistentQuery

func (*MockVersionCheckerMockRecorder) SupportsRawHistoryQuery added in v0.15.0

func (mr *MockVersionCheckerMockRecorder) SupportsRawHistoryQuery(clientImpl, clientFeatureVersion interface{}) *gomock.Call

SupportsRawHistoryQuery indicates an expected call of SupportsRawHistoryQuery

func (*MockVersionCheckerMockRecorder) SupportsStickyQuery added in v0.15.0

func (mr *MockVersionCheckerMockRecorder) SupportsStickyQuery(clientImpl, clientFeatureVersion interface{}) *gomock.Call

SupportsStickyQuery indicates an expected call of SupportsStickyQuery

func (*MockVersionCheckerMockRecorder) SupportsWorkflowAlreadyCompletedError added in v0.21.0

func (mr *MockVersionCheckerMockRecorder) SupportsWorkflowAlreadyCompletedError(clientImpl, clientFeatureVersion 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

type VersionCheckerMock added in v0.15.0

type VersionCheckerMock struct {
	// contains filtered or unexported fields
}

VersionCheckerMock is a mock of VersionChecker interface

func NewMockVersionChecker added in v0.15.0

func NewMockVersionChecker(ctrl *gomock.Controller) *VersionCheckerMock

NewMockVersionChecker creates a new mock instance

func (*VersionCheckerMock) ClientSupported added in v0.15.0

func (m *VersionCheckerMock) ClientSupported(ctx context.Context, enableClientVersionCheck bool) error

ClientSupported mocks base method

func (*VersionCheckerMock) EXPECT added in v0.15.0

EXPECT returns an object that allows the caller to indicate expected use

func (*VersionCheckerMock) SupportsConsistentQuery added in v0.15.0

func (m *VersionCheckerMock) SupportsConsistentQuery(clientImpl, clientFeatureVersion string) error

SupportsConsistentQuery mocks base method

func (*VersionCheckerMock) SupportsRawHistoryQuery added in v0.15.0

func (m *VersionCheckerMock) SupportsRawHistoryQuery(clientImpl, clientFeatureVersion string) error

SupportsRawHistoryQuery mocks base method

func (*VersionCheckerMock) SupportsStickyQuery added in v0.15.0

func (m *VersionCheckerMock) SupportsStickyQuery(clientImpl, clientFeatureVersion string) error

SupportsStickyQuery mocks base method

func (*VersionCheckerMock) SupportsWorkflowAlreadyCompletedError added in v0.21.0

func (m *VersionCheckerMock) SupportsWorkflowAlreadyCompletedError(clientImpl, clientFeatureVersion string, featureFlags shared.FeatureFlags) error

SupportsWorkflowAlreadyCompletedError mocks base method

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL