sijie commented on a change in pull request #4174: [go function] support 
localrun and cluster mode for go function
URL: https://github.com/apache/pulsar/pull/4174#discussion_r279607231
 
 

 ##########
 File path: pulsar-function-go/conf/conf.go
 ##########
 @@ -45,6 +45,7 @@ type Conf struct {
        Tenant               string `yaml:"tenant"`
        NameSpace            string `yaml:"nameSpace"`
        Name                 string `yaml:"name"`
+       ClassName            string `yaml:"className"`
 
 Review comment:
   I don't think Go needs `ClassName`.
   
   Go has a completely different way to run functions than Java and Python.
   
   In Java or Python, the instance code is isolated from user code since they 
support dynamically loading the code. So you need two parameters: `--jar` or 
`--py` to specify whether the function code; and `--className` to tell the 
function runtime to the entrypoint (aka className) to invoke the function.
   
   However Go is a static-linking language. The instance is compiled with user 
function. There is only one entrypoint (which is the main func) for invoking 
the user function. Hence we only need the code file for go but we don't need a 
className. So I would suggest not adding a field if it is not used. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to