Skip to content

Commit

Permalink
Start cadence client worker upon worker role startup (cadence-workflo…
Browse files Browse the repository at this point in the history
…w#1244)

Starts cadence client as part of worker role. Next diff will include plumbing to send signal to hosted workflow to do system activity.
  • Loading branch information
andrewjdawson2016 authored Nov 14, 2018
1 parent e8c5b5e commit bcd373f
Show file tree
Hide file tree
Showing 16 changed files with 1,905 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language: go
directories:
- $HOME/.glide/cache
go:
- 1.11.x
- 1.11.1

env:
global:
Expand Down
13 changes: 13 additions & 0 deletions client/clientfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package client

import (
"github.com/uber/cadence/client/frontend"
"github.com/uber/cadence/client/history"
"github.com/uber/cadence/client/matching"
"github.com/uber/cadence/common"
Expand All @@ -32,6 +33,7 @@ import (
type Factory interface {
NewHistoryClient() (history.Client, error)
NewMatchingClient() (matching.Client, error)
NewFrontendClient() (frontend.Client, error)
}

type rpcClientFactory struct {
Expand Down Expand Up @@ -73,3 +75,14 @@ func (cf *rpcClientFactory) NewMatchingClient() (matching.Client, error) {
}
return client, nil
}

func (cf *rpcClientFactory) NewFrontendClient() (frontend.Client, error) {
client, err := frontend.NewClient(cf.df, cf.monitor)
if err != nil {
return nil, err
}
if cf.metricsClient != nil {
client = frontend.NewMetricClient(client, cf.metricsClient)
}
return client, nil
}
Loading

0 comments on commit bcd373f

Please sign in to comment.