Official | HULFT IoT EdgeStreaming Plugin SDK Getting Started Third Edition: July 1, 2021

Creation of plugin_main.go

EdgeStreaming Plugin is created as a standalone execution module.

Therefore, the "main" function must be implemented.

 

  1. Create the plugin_main.go file directly under the "external" folder and define as follows:

    package main
    
    import ( 
        "os" 
    
        // Import the package of the created plugin 
        "github.sis.saison.co.jp/sherpa/es-agent/external/plugin" 
        _ "github.sis.saison.co.jp/sherpa/es-agent/sample/plugin"
    )
    
    func main() {
        if err := plugin.NewServer().ListenAndServe(); err != nil {
            os.Exit(1)
        }
    }
    

     

    = Remarks =

    The implemented content in plugin_main.go is always the same except for the part for importing plugin packages.

     

This completes implementation in the execution environment.

 

For details on implementation of plugins in the execution environment, refer to the following:

http://docs.sensorbee.io/en/latest/server_programming.html

 

 

 

Official | HULFT IoT EdgeStreaming Plugin SDK Getting Started Third Edition: July 1, 2021