Skip to content

Commit

Permalink
refactor(sdk): rename golangruntime to FunctionPipelineRuntime
Browse files Browse the repository at this point in the history
rename  Golangruntine to FunctionPipelineRuntime for better readability

Closes #1199

Signed-off-by: Marc-Philippe Fuller <[email protected]>
  • Loading branch information
marcpfuller committed Nov 30, 2022
1 parent 3ad1ce6 commit 0ee5f87
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 140 deletions.
6 changes: 3 additions & 3 deletions app-service-template/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/edgexfoundry/go-mod-core-contracts/v2 v2.3.0
github.com/google/uuid v1.3.0
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/stretchr/testify v1.8.0
github.com/stretchr/testify v1.8.1
)

require (
Expand All @@ -21,7 +21,7 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/diegoholiveira/jsonlogic/v3 v3.2.6 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.1 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.2 // indirect
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0 // indirect
github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0 // indirect
github.com/edgexfoundry/go-mod-messaging/v2 v2.3.0 // indirect
Expand Down Expand Up @@ -63,7 +63,7 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spiffe/go-spiffe/v2 v2.1.1 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/errs v1.2.2 // indirect
golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect
Expand Down
10 changes: 6 additions & 4 deletions app-service-template/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/diegoholiveira/jsonlogic/v3 v3.2.6 h1:EV607wRY72hT3V90ZOQw+zjXR9KIUV9jnHfT3yS8uks=
github.com/diegoholiveira/jsonlogic/v3 v3.2.6/go.mod h1:9oE8z9G+0OMxOoLHF3fhek3KuqD5CBqM0B6XFL08MSg=
github.com/eclipse/paho.mqtt.golang v1.4.1 h1:tUSpviiL5G3P9SZZJPC4ZULZJsxQKXxfENpMvdbAXAI=
github.com/eclipse/paho.mqtt.golang v1.4.1/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA=
github.com/eclipse/paho.mqtt.golang v1.4.2 h1:66wOzfUHSSI1zamx7jR6yMEI5EuHnT1G6rNA5PM12m4=
github.com/eclipse/paho.mqtt.golang v1.4.2/go.mod h1:JGt0RsEwEX+Xa/agj90YJ9d9DH2b7upDZMK9HRbFvCA=
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0 h1:NCOc5bOz6oX+KuOcv0Rt6BTSDShbg4VmCapXO19IoCM=
github.com/edgexfoundry/go-mod-bootstrap/v2 v2.3.0/go.mod h1:jWZjsy0BaO6+S+Tq111mcrkGKpg6bhTyqngyYcl+70E=
github.com/edgexfoundry/go-mod-configuration/v2 v2.3.0 h1:VeK7VBiNc/RIR7HXC0ya3fWCmcFQzrSLITPYn87cQsA=
Expand Down Expand Up @@ -289,17 +289,19 @@ github.com/spiffe/go-spiffe/v2 v2.1.1 h1:RT9kM8MZLZIsPTH+HKQEP5yaAk3yd/VBzlINaRj
github.com/spiffe/go-spiffe/v2 v2.1.1/go.mod h1:5qg6rpqlwIub0JAiF1UK9IMD6BpPTmvG6yfSgDBs5lg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
Expand Down
4 changes: 2 additions & 2 deletions internal/app/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ type Service struct {
config *common.ConfigurationStruct
lc logger.LoggingClient
usingConfigurablePipeline bool
runtime *runtime.AppServiceRuntime
runtime *runtime.FunctionsPipelineRuntime
webserver *webserver.WebServer
ctx contextGroup
deferredFunctions []bootstrap.Deferred
Expand Down Expand Up @@ -549,7 +549,7 @@ func (svc *Service) Initialize() error {
return fmt.Errorf("unable to parse Service.RequestTimeout configuration as a time duration: %s", err.Error())
}

svc.runtime = runtime.NewAppServiceRuntime(svc.serviceKey, svc.targetType, svc.dic)
svc.runtime = runtime.NewFunctionPipelineRuntime(svc.serviceKey, svc.targetType, svc.dic)

// Bootstrapping is complete, so now need to retrieve the needed objects from the containers.
svc.lc = bootstrapContainer.LoggingClientFrom(svc.dic.Get)
Expand Down
10 changes: 5 additions & 5 deletions internal/app/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func TestSetupHTTPTrigger(t *testing.T) {
},
}

testRuntime := runtime.NewAppServiceRuntime("", nil, dic)
testRuntime := runtime.NewFunctionPipelineRuntime("", nil, dic)
testRuntime.SetDefaultFunctionsPipeline(nil)

sdk.runtime = testRuntime
Expand All @@ -276,7 +276,7 @@ func TestSetupMessageBusTrigger(t *testing.T) {
},
},
}
testRuntime := runtime.NewAppServiceRuntime("", nil, dic)
testRuntime := runtime.NewFunctionPipelineRuntime("", nil, dic)
testRuntime.SetDefaultFunctionsPipeline(nil)

sdk.runtime = testRuntime
Expand Down Expand Up @@ -305,7 +305,7 @@ func TestSetDefaultFunctionsPipelineOneTransform(t *testing.T) {
service := Service{
lc: lc,
dic: dic,
runtime: runtime.NewAppServiceRuntime("", nil, dic),
runtime: runtime.NewFunctionPipelineRuntime("", nil, dic),
config: &common.ConfigurationStruct{
Trigger: common.TriggerInfo{
Type: TriggerTypeMessageBus,
Expand All @@ -324,7 +324,7 @@ func TestService_AddFunctionsPipelineForTopics(t *testing.T) {
service := Service{
lc: lc,
dic: dic,
runtime: runtime.NewAppServiceRuntime("", nil, dic),
runtime: runtime.NewFunctionPipelineRuntime("", nil, dic),
config: &common.ConfigurationStruct{
Trigger: common.TriggerInfo{
Type: TriggerTypeMessageBus,
Expand Down Expand Up @@ -379,7 +379,7 @@ func TestService_RemoveAllFunctionPipelines(t *testing.T) {
service := Service{
lc: lc,
dic: dic,
runtime: runtime.NewGolangRuntime("", nil, dic),
runtime: runtime.NewFunctionPipelineRuntime("", nil, dic),
config: &common.ConfigurationStruct{
Trigger: common.TriggerInfo{
Type: TriggerTypeMessageBus,
Expand Down
2 changes: 1 addition & 1 deletion internal/app/triggermessageprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (

type simpleTriggerServiceBinding struct {
*Service
*runtime.AppServiceRuntime
*runtime.FunctionsPipelineRuntime
}

func (b *simpleTriggerServiceBinding) SecretProvider() messaging.SecretDataProvider {
Expand Down
Loading

0 comments on commit 0ee5f87

Please sign in to comment.