Version: v0.0.0-...-f7d131a Latest Latest

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 21 Imported by: 0




This section is empty.


This section is empty.


func Int32Ptr

func Int32Ptr(v int32) *int32

Int32Ptr returns pointer to a int32

func Int64Ptr

func Int64Ptr(v int64) *int64

Int64Ptr returns pointer to a int64

func StringPtr

func StringPtr(v string) *string

StringPtr returns pointer to a string


type Configuration

type Configuration struct {
	DomainName      string                    `yaml:"domain"`
	ServiceName     string                    `yaml:"service"`
	HostNameAndPort string                    `yaml:"host"`
	Prometheus      *prometheus.Configuration `yaml:"prometheus"`

Configuration for running samples.

type SampleHelper

type SampleHelper struct {
	Service            workflowserviceclient.Interface
	WorkerMetricScope  tally.Scope
	ServiceMetricScope tally.Scope
	Logger             *zap.Logger
	Config             Configuration
	Builder            *WorkflowClientBuilder
	DataConverter      encoded.DataConverter
	CtxPropagators     []workflow.ContextPropagator
	// contains filtered or unexported fields

SampleHelper class for workflow sample helper.

func (*SampleHelper) CancelWorkflow

func (h *SampleHelper) CancelWorkflow(workflowID string)

func (*SampleHelper) ConsistentQueryWorkflow

func (h *SampleHelper) ConsistentQueryWorkflow(
	valuePtr interface{},
	workflowID, runID, queryType string,
	args ...interface{},
) error

func (*SampleHelper) QueryWorkflow

func (h *SampleHelper) QueryWorkflow(workflowID, runID, queryType string, args ...interface{})

func (*SampleHelper) RegisterActivity

func (h *SampleHelper) RegisterActivity(activity interface{})

func (*SampleHelper) RegisterActivityWithAlias

func (h *SampleHelper) RegisterActivityWithAlias(activity interface{}, alias string)

func (*SampleHelper) RegisterWorkflow

func (h *SampleHelper) RegisterWorkflow(workflow interface{})

func (*SampleHelper) RegisterWorkflowWithAlias

func (h *SampleHelper) RegisterWorkflowWithAlias(workflow interface{}, alias string)

func (*SampleHelper) SetConfigFile

func (h *SampleHelper) SetConfigFile(configFile string)

SetConfigFile sets the config file path

func (*SampleHelper) SetupServiceConfig

func (h *SampleHelper) SetupServiceConfig()

SetupServiceConfig setup the config for the sample code run

func (*SampleHelper) SignalWithStartWorkflowWithCtx

func (h *SampleHelper) SignalWithStartWorkflowWithCtx(ctx context.Context, workflowID string, signalName string, signalArg interface{},
	options client.StartWorkflowOptions, workflow interface{}, workflowArgs ...interface{}) *workflow.Execution

SignalWithStartWorkflowWithCtx signals workflow and starts it if it's not yet started

func (*SampleHelper) SignalWorkflow

func (h *SampleHelper) SignalWorkflow(workflowID, signal string, data interface{})

func (*SampleHelper) StartWorkers

func (h *SampleHelper) StartWorkers(domainName string, groupName string, options worker.Options)

StartWorkers starts workflow worker and activity worker based on configured options.

func (*SampleHelper) StartWorkflow

func (h *SampleHelper) StartWorkflow(
	options client.StartWorkflowOptions,
	workflow interface{},
	args ...interface{},
) *workflow.Execution

StartWorkflow starts a workflow

func (*SampleHelper) StartWorkflowWithCtx

func (h *SampleHelper) StartWorkflowWithCtx(
	ctx context.Context,
	options client.StartWorkflowOptions,
	workflow interface{},
	args ...interface{},
) *workflow.Execution

StartWorkflowWithCtx starts a workflow with the provided context

type WorkflowClientBuilder

type WorkflowClientBuilder struct {
	Logger *zap.Logger
	// contains filtered or unexported fields

WorkflowClientBuilder build client to cadence service

func NewBuilder

func NewBuilder(logger *zap.Logger) *WorkflowClientBuilder

NewBuilder creates a new WorkflowClientBuilder

func (*WorkflowClientBuilder) BuildCadenceClient

func (b *WorkflowClientBuilder) BuildCadenceClient() (client.Client, error)

BuildCadenceClient builds a client to cadence service

func (*WorkflowClientBuilder) BuildCadenceDomainClient

func (b *WorkflowClientBuilder) BuildCadenceDomainClient() (client.DomainClient, error)

BuildCadenceDomainClient builds a domain client to cadence service

func (*WorkflowClientBuilder) BuildServiceClient

func (b *WorkflowClientBuilder) BuildServiceClient() (workflowserviceclient.Interface, error)

BuildServiceClient builds a rpc service client to cadence service

func (*WorkflowClientBuilder) SetClientIdentity

func (b *WorkflowClientBuilder) SetClientIdentity(identity string) *WorkflowClientBuilder

SetClientIdentity sets the identity for the builder

func (*WorkflowClientBuilder) SetContextPropagators

func (b *WorkflowClientBuilder) SetContextPropagators(ctxProps []workflow.ContextPropagator) *WorkflowClientBuilder

SetContextPropagators sets the context propagators for the builder

func (*WorkflowClientBuilder) SetDataConverter

func (b *WorkflowClientBuilder) SetDataConverter(dataConverter encoded.DataConverter) *WorkflowClientBuilder

SetDataConverter sets the data converter for the builder

func (*WorkflowClientBuilder) SetDispatcher

func (b *WorkflowClientBuilder) SetDispatcher(dispatcher *yarpc.Dispatcher) *WorkflowClientBuilder

SetDispatcher sets the dispatcher for the builder

func (*WorkflowClientBuilder) SetDomain

func (b *WorkflowClientBuilder) SetDomain(domain string) *WorkflowClientBuilder

SetDomain sets the domain for the builder

func (*WorkflowClientBuilder) SetHostPort

func (b *WorkflowClientBuilder) SetHostPort(hostport string) *WorkflowClientBuilder

SetHostPort sets the hostport for the builder

func (*WorkflowClientBuilder) SetMetricsScope

func (b *WorkflowClientBuilder) SetMetricsScope(metricsScope tally.Scope) *WorkflowClientBuilder

SetMetricsScope sets the metrics scope for the builder

Jump to

Keyboard shortcuts

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