@@ -15,19 +15,19 @@ type Invoker interface {
1515}
1616
1717func CreateInvoker (cfg * config.Configuration , announceDoneExe * sync.WaitGroup , readOpenWhiskMetadata * sync.Mutex ) Invoker {
18- switch cfg .LoaderConfiguration .Platform {
19- case "AWSLambda" :
18+ switch strings . ToLower ( cfg .LoaderConfiguration .Platform ) {
19+ case common . PlatformAWSLambda :
2020 return newAWSLambdaInvoker (announceDoneExe )
21- case "Dirigent" :
21+ case common . PlatformDirigent :
2222 if cfg .DirigentConfiguration == nil {
2323 logrus .Fatal ("Failed to create invoker: dirigent configuration is required for platform 'dirigent'" )
2424 }
25- if strings .ToLower (cfg .DirigentConfiguration .Backend ) == "dandelion" || cfg .LoaderConfiguration .InvokeProtocol != "grpc" {
25+ if strings .ToLower (cfg .DirigentConfiguration .Backend ) == common . BackendDandelion || cfg .LoaderConfiguration .InvokeProtocol != "grpc" {
2626 return newHTTPInvoker (cfg )
2727 } else {
2828 return newGRPCInvoker (cfg .LoaderConfiguration , ExecutorRPC {})
2929 }
30- case "Knative" :
30+ case common . PlatformKnative :
3131 if cfg .LoaderConfiguration .InvokeProtocol == "grpc" {
3232 if ! cfg .LoaderConfiguration .VSwarm {
3333 return newGRPCInvoker (cfg .LoaderConfiguration , ExecutorRPC {})
@@ -37,7 +37,7 @@ func CreateInvoker(cfg *config.Configuration, announceDoneExe *sync.WaitGroup, r
3737 } else {
3838 return newHTTPInvoker (cfg )
3939 }
40- case "OpenWhisk" :
40+ case common . PlatformOpenWhisk :
4141 return newOpenWhiskInvoker (announceDoneExe , readOpenWhiskMetadata )
4242 default :
4343 logrus .Fatal ("Unsupported platform." )
0 commit comments