feat: Add Gin framework to various packages, introducing new server structure with separate service registries for general nodes, map nodes, and reduce nodes.
This commit is contained in:
19
cmd/general_node.go
Normal file
19
cmd/general_node.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
generalnode "github.com/alexohneander/flotte/pkg/general-node"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(generalnodeCmd)
|
||||
}
|
||||
|
||||
var generalnodeCmd = &cobra.Command{
|
||||
Use: "general-node",
|
||||
Short: "Start a general node",
|
||||
Long: `Long`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
generalnode.Start()
|
||||
},
|
||||
}
|
19
cmd/map_node.go
Normal file
19
cmd/map_node.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
mapnode "github.com/alexohneander/flotte/pkg/map-node"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(mapnodeCmd)
|
||||
}
|
||||
|
||||
var mapnodeCmd = &cobra.Command{
|
||||
Use: "map-node",
|
||||
Short: "Start a map node",
|
||||
Long: `Long`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
mapnode.Start()
|
||||
},
|
||||
}
|
19
cmd/reduce_node.go
Normal file
19
cmd/reduce_node.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
reducenode "github.com/alexohneander/flotte/pkg/reduce-node"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(reducenodeCmd)
|
||||
}
|
||||
|
||||
var reducenodeCmd = &cobra.Command{
|
||||
Use: "reduce-node",
|
||||
Short: "Start a reduce node",
|
||||
Long: `Long`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
reducenode.Start()
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user