Documentation ¶
Index ¶
- Variables
- type AdminClient
- type ArchiverBase
- type Cadence
- type CadenceParams
- type FrontendClient
- type HistoryClient
- type HistoryConfig
- type IntegrationBase
- type MessagingClientConfig
- type TaskPoller
- func (p *TaskPoller) HandlePartialDecision(response *types.PollForDecisionTaskResponse) (*types.RespondDecisionTaskCompletedResponse, error)
- func (p *TaskPoller) PollAndProcessActivityTask(dropTask bool) error
- func (p *TaskPoller) PollAndProcessActivityTaskWithID(dropTask bool) error
- func (p *TaskPoller) PollAndProcessDecisionTask(dumpHistory bool, dropTask bool) (isQueryTask bool, err error)
- func (p *TaskPoller) PollAndProcessDecisionTaskWithAttempt(dumpHistory bool, dropTask bool, pollStickyTaskList bool, ...) (isQueryTask bool, err error)
- func (p *TaskPoller) PollAndProcessDecisionTaskWithAttemptAndRetry(dumpHistory bool, dropTask bool, pollStickyTaskList bool, ...) (isQueryTask bool, err error)
- func (p *TaskPoller) PollAndProcessDecisionTaskWithAttemptAndRetryAndForceNewDecision(dumpHistory bool, dropTask bool, pollStickyTaskList bool, ...) (isQueryTask bool, newTask *types.RespondDecisionTaskCompletedResponse, ...)
- func (p *TaskPoller) PollAndProcessDecisionTaskWithSticky(dumpHistory bool, dropTask bool) (isQueryTask bool, err error)
- func (p *TaskPoller) PollAndProcessDecisionTaskWithoutRetry(dumpHistory bool, dropTask bool) (isQueryTask bool, err error)
- type TestCluster
- type TestClusterConfig
- type WorkerConfig
Constants ¶
This section is empty.
Variables ¶
var TestFlags struct { FrontendAddr string PersistenceType string SQLPluginName string TestClusterConfigFile string }
TestFlags contains the feature flags for integration tests
Functions ¶
This section is empty.
Types ¶
type AdminClient ¶ added in v0.5.0
AdminClient is the interface exposed by admin service client
func NewAdminClient ¶ added in v0.5.0
func NewAdminClient(d *yarpc.Dispatcher) AdminClient
NewAdminClient creates a client to cadence admin client
type ArchiverBase ¶ added in v0.7.0
type ArchiverBase struct {
// contains filtered or unexported fields
}
ArchiverBase is a base struct for archiver provider being used in integration tests
type Cadence ¶
type Cadence interface { Start() error Stop() GetAdminClient() adminClient.Client GetFrontendClient() frontendClient.Client FrontendAddress() string GetHistoryClient() historyClient.Client GetExecutionManagerFactory() persistence.ExecutionManagerFactory }
Cadence hosts all of cadence services in one process
func NewCadence ¶
func NewCadence(params *CadenceParams) Cadence
NewCadence returns an instance that hosts full cadence in one process
type CadenceParams ¶ added in v0.5.7
type CadenceParams struct { ClusterMetadata cluster.Metadata PersistenceConfig config.Persistence DispatcherProvider client.DispatcherProvider MessagingClient messaging.Client MetadataMgr persistence.MetadataManager ShardMgr persistence.ShardManager HistoryV2Mgr persistence.HistoryManager ExecutionMgrFactory persistence.ExecutionManagerFactory TaskMgr persistence.TaskManager VisibilityMgr persistence.VisibilityManager DomainReplicationQueue domain.ReplicationQueue Logger log.Logger ClusterNo int ArchiverMetadata carchiver.ArchivalMetadata ArchiverProvider provider.ArchiverProvider EnableReadHistoryFromArchival bool HistoryConfig *HistoryConfig ESConfig *config.ElasticSearchConfig ESClient elasticsearch.GenericClient WorkerConfig *WorkerConfig MockAdminClient map[string]adminClient.Client DomainReplicationTaskExecutor domain.ReplicationTaskExecutor }
CadenceParams contains everything needed to bootstrap Cadence
type FrontendClient ¶ added in v0.5.0
FrontendClient is the interface exposed by frontend service client
func NewFrontendClient ¶ added in v0.5.0
func NewFrontendClient(d *yarpc.Dispatcher) FrontendClient
NewFrontendClient creates a client to cadence frontend client
type HistoryClient ¶ added in v0.9.3
HistoryClient is the interface exposed by history service client
func NewHistoryClient ¶ added in v0.9.3
func NewHistoryClient(d *yarpc.Dispatcher) HistoryClient
NewHistoryClient creates a client to cadence history service client
type HistoryConfig ¶ added in v0.5.7
type HistoryConfig struct { NumHistoryShards int NumHistoryHosts int HistoryCountLimitError int HistoryCountLimitWarn int }
HistoryConfig contains configs for history service
type IntegrationBase ¶ added in v0.4.0
type IntegrationBase struct { suite.Suite Logger log.Logger // contains filtered or unexported fields }
IntegrationBase is a base struct for integration tests
type MessagingClientConfig ¶ added in v0.5.7
type MessagingClientConfig struct { UseMock bool KafkaConfig *config.KafkaConfig }
MessagingClientConfig is the config for messaging config
type TaskPoller ¶ added in v0.4.0
type TaskPoller struct { Engine FrontendClient Domain string TaskList *types.TaskList StickyTaskList *types.TaskList StickyScheduleToStartTimeoutSeconds *int32 Identity string DecisionHandler decisionTaskHandler ActivityHandler activityTaskHandler QueryHandler queryHandler Logger log.Logger T *testing.T }
TaskPoller is used in integration tests to poll decision or activity tasks
func (*TaskPoller) HandlePartialDecision ¶ added in v0.4.0
func (p *TaskPoller) HandlePartialDecision(response *types.PollForDecisionTaskResponse) ( *types.RespondDecisionTaskCompletedResponse, error)
HandlePartialDecision for decision task
func (*TaskPoller) PollAndProcessActivityTask ¶ added in v0.4.0
func (p *TaskPoller) PollAndProcessActivityTask(dropTask bool) error
PollAndProcessActivityTask for activity tasks
func (*TaskPoller) PollAndProcessActivityTaskWithID ¶ added in v0.4.0
func (p *TaskPoller) PollAndProcessActivityTaskWithID(dropTask bool) error
PollAndProcessActivityTaskWithID is similar to PollAndProcessActivityTask but using RespondActivityTask...ByID
func (*TaskPoller) PollAndProcessDecisionTask ¶ added in v0.4.0
func (p *TaskPoller) PollAndProcessDecisionTask(dumpHistory bool, dropTask bool) (isQueryTask bool, err error)
PollAndProcessDecisionTask for decision tasks
func (*TaskPoller) PollAndProcessDecisionTaskWithAttempt ¶ added in v0.4.0
func (p *TaskPoller) PollAndProcessDecisionTaskWithAttempt( dumpHistory bool, dropTask bool, pollStickyTaskList bool, respondStickyTaskList bool, decisionAttempt int64, ) (isQueryTask bool, err error)
PollAndProcessDecisionTaskWithAttempt for decision tasks
func (*TaskPoller) PollAndProcessDecisionTaskWithAttemptAndRetry ¶ added in v0.4.0
func (p *TaskPoller) PollAndProcessDecisionTaskWithAttemptAndRetry( dumpHistory bool, dropTask bool, pollStickyTaskList bool, respondStickyTaskList bool, decisionAttempt int64, retryCount int, ) (isQueryTask bool, err error)
PollAndProcessDecisionTaskWithAttemptAndRetry for decision tasks
func (*TaskPoller) PollAndProcessDecisionTaskWithAttemptAndRetryAndForceNewDecision ¶ added in v0.4.0
func (p *TaskPoller) PollAndProcessDecisionTaskWithAttemptAndRetryAndForceNewDecision( dumpHistory bool, dropTask bool, pollStickyTaskList bool, respondStickyTaskList bool, decisionAttempt int64, retryCount int, forceCreateNewDecision bool, queryResult *types.WorkflowQueryResult, ) (isQueryTask bool, newTask *types.RespondDecisionTaskCompletedResponse, err error)
PollAndProcessDecisionTaskWithAttemptAndRetryAndForceNewDecision for decision tasks
func (*TaskPoller) PollAndProcessDecisionTaskWithSticky ¶ added in v0.4.0
func (p *TaskPoller) PollAndProcessDecisionTaskWithSticky(dumpHistory bool, dropTask bool) (isQueryTask bool, err error)
PollAndProcessDecisionTaskWithSticky for decision tasks
func (*TaskPoller) PollAndProcessDecisionTaskWithoutRetry ¶ added in v0.4.0
func (p *TaskPoller) PollAndProcessDecisionTaskWithoutRetry(dumpHistory bool, dropTask bool) (isQueryTask bool, err error)
PollAndProcessDecisionTaskWithoutRetry for decision tasks
type TestCluster ¶ added in v0.5.7
type TestCluster struct {
// contains filtered or unexported fields
}
TestCluster is a base struct for integration tests
func NewCluster ¶ added in v0.5.7
func NewCluster(options *TestClusterConfig, logger log.Logger) (*TestCluster, error)
NewCluster creates and sets up the test cluster
func (*TestCluster) GetAdminClient ¶ added in v0.5.7
func (tc *TestCluster) GetAdminClient() AdminClient
GetAdminClient returns an admin client from the test cluster
func (*TestCluster) GetExecutionManagerFactory ¶ added in v0.11.0
func (tc *TestCluster) GetExecutionManagerFactory() persistence.ExecutionManagerFactory
GetExecutionManagerFactory returns an execution manager factory from the test cluster
func (*TestCluster) GetFrontendClient ¶ added in v0.5.7
func (tc *TestCluster) GetFrontendClient() FrontendClient
GetFrontendClient returns a frontend client from the test cluster
func (*TestCluster) GetHistoryClient ¶ added in v0.9.3
func (tc *TestCluster) GetHistoryClient() HistoryClient
GetHistoryClient returns a history client from the test cluster
func (*TestCluster) TearDownCluster ¶ added in v0.5.7
func (tc *TestCluster) TearDownCluster()
TearDownCluster tears down the test cluster
type TestClusterConfig ¶ added in v0.5.7
type TestClusterConfig struct { FrontendAddress string EnableArchival bool IsMasterCluster bool ClusterNo int ClusterMetadata config.ClusterMetadata MessagingClientConfig *MessagingClientConfig Persistence persistencetests.TestBaseOptions HistoryConfig *HistoryConfig ESConfig *config.ElasticSearchConfig WorkerConfig *WorkerConfig MockAdminClient map[string]adminClient.Client }
TestClusterConfig are config for a test cluster
func GetTestClusterConfig ¶ added in v0.5.7
func GetTestClusterConfig(configFile string) (*TestClusterConfig, error)
GetTestClusterConfig return test cluster config
type WorkerConfig ¶ added in v0.5.7
WorkerConfig is the config for enabling/disabling cadence worker