Documentation ¶
Index ¶
- Constants
- func BuildCadenceClient() workflowserviceclient.Interface
- func BuildLogger() *zap.Logger
- type CadenceHelper
- type Configuration
- type HTTPError
- type QueryResult
- type State
- type WorkflowClientBuilder
- func (b *WorkflowClientBuilder) BuildCadenceClient() (client.Client, error)
- func (b *WorkflowClientBuilder) BuildCadenceDomainClient() (client.DomainClient, error)
- func (b *WorkflowClientBuilder) BuildServiceClient() (workflowserviceclient.Interface, error)
- func (b *WorkflowClientBuilder) SetClientIdentity(identity string) *WorkflowClientBuilder
- func (b *WorkflowClientBuilder) SetContextPropagators(ctxProps []workflow.ContextPropagator) *WorkflowClientBuilder
- func (b *WorkflowClientBuilder) SetDataConverter(dataConverter encoded.DataConverter) *WorkflowClientBuilder
- func (b *WorkflowClientBuilder) SetDispatcher(dispatcher *yarpc.Dispatcher) *WorkflowClientBuilder
- func (b *WorkflowClientBuilder) SetDomain(domain string) *WorkflowClientBuilder
- func (b *WorkflowClientBuilder) SetHostPort(hostport string) *WorkflowClientBuilder
- func (b *WorkflowClientBuilder) SetMetricsScope(metricsScope tally.Scope) *WorkflowClientBuilder
- func (b *WorkflowClientBuilder) SetTracer(tracer opentracing.Tracer) *WorkflowClientBuilder
Constants ¶
const ( HostPort = "127.0.0.1:7833" Domain = "lo-domain" // TaskListName identifies set of loan_client workflows, activities, and workers. // It could be your group or loan_client or application name. TaskListName = "lo-loan_worker" ClientName = "lo-loan_worker" CadenceService = "cadence-frontend" QueryNameLoWorkflowState = "lo-workflow-state" Initialized State = "initialized" Submitted State = "submitted" Approved State = "approved" Rejected State = "rejected" Closed State = "closed" )
Variables ¶
This section is empty.
Functions ¶
func BuildCadenceClient ¶
func BuildCadenceClient() workflowserviceclient.Interface
func BuildLogger ¶
Types ¶
type CadenceHelper ¶
type CadenceHelper struct { Service workflowserviceclient.Interface WorkerMetricScope tally.Scope ServiceMetricScope tally.Scope Logger *zap.Logger Config Configuration Builder *WorkflowClientBuilder DataConverter encoded.DataConverter CtxPropagators []workflow.ContextPropagator //workflowRegistries []registryOption //activityRegistries []registryOption Tracer opentracing.Tracer // contains filtered or unexported fields }
var LOCadenceHelper *CadenceHelper
func NewLOCadenceHelper ¶
func NewLOCadenceHelper(h *CadenceHelper) *CadenceHelper
func (*CadenceHelper) SetupServiceConfig ¶
func (h *CadenceHelper) SetupServiceConfig()
SetupServiceConfig setup the config for the sample code run
func (*CadenceHelper) StartLoanOriginationWorkflowExecution ¶
func (c *CadenceHelper) StartLoanOriginationWorkflowExecution(workflowType, workflowID, runID string, input []byte)
type Configuration ¶
type Configuration struct { DomainName string `yaml:"domain"` ServiceName string `yaml:"service"` HostNameAndPort string `yaml:"host"` TaskList string `yaml:"tasklist"` Prometheus *prometheus.Configuration `yaml:"prometheus"` }
type QueryResult ¶
type WorkflowClientBuilder ¶
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
func (*WorkflowClientBuilder) SetTracer ¶
func (b *WorkflowClientBuilder) SetTracer(tracer opentracing.Tracer) *WorkflowClientBuilder
SetTracer sets the tracer for the builder