kopia lustrzana https://github.com/bugout-dev/moonstream
Updated structure
rodzic
bf1f33e683
commit
cc0b25bf03
|
@ -61,5 +61,4 @@ go.work
|
|||
dev.env
|
||||
prod.env
|
||||
test.env
|
||||
nodebalancer
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ echo
|
|||
echo -e "${PREFIX_INFO} Building executable load balancer for nodes script with Go"
|
||||
EXEC_DIR=$(pwd)
|
||||
cd "${APP_NODES_DIR}/node_balancer"
|
||||
HOME=/root /usr/local/go/bin/go build -o "${APP_NODES_DIR}/node_balancer/nodebalancer" "${APP_NODES_DIR}/node_balancer/main.go"
|
||||
HOME=/root /usr/local/go/bin/go build -o "${APP_NODES_DIR}/node_balancer/nodebalancer" "${APP_NODES_DIR}/node_balancer/cmd/nodebalancer/*.go"
|
||||
cd "${EXEC_DIR}"
|
||||
|
||||
echo
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Load balancer, based on https://github.com/kasvith/simplelb/
|
||||
*/
|
||||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
|
@ -1,4 +1,4 @@
|
|||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
|
@ -1,4 +1,4 @@
|
|||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
@ -139,7 +139,6 @@ func (s *StateCLI) checkRequirements() {
|
|||
}
|
||||
|
||||
config := configs.GetConfigPath(s.configPathFlag)
|
||||
fmt.Println(config)
|
||||
if !configs.CheckPathExists(config.ConfigPath) {
|
||||
configs.GenerateDefaultConfig(config)
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
@ -23,7 +23,7 @@ type ClientResourceData struct {
|
|||
Description string `json:"description"`
|
||||
BlockchainAccess bool `json:"blockchain_access"`
|
||||
ExtendedMethods bool `json:"extended_methods"`
|
||||
|
||||
|
||||
LastAccessTs int64 `json:"last_access_ts"`
|
||||
|
||||
dataSource string
|
|
@ -1,4 +1,4 @@
|
|||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"reflect"
|
|
@ -1,4 +1,4 @@
|
|||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"database/sql"
|
|
@ -0,0 +1,5 @@
|
|||
package main
|
||||
|
||||
func main() {
|
||||
CLI()
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Server API middleware.
|
||||
*/
|
||||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Handle routes for load balancer API.
|
||||
*/
|
||||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
Node load balancer API server initialization.
|
||||
*/
|
||||
package cmd
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
|
@ -5,6 +5,6 @@ set -e
|
|||
|
||||
PROGRAM_NAME="nodebalancer"
|
||||
|
||||
go build -o "$PROGRAM_NAME" .
|
||||
go build -o "$PROGRAM_NAME" cmd/nodebalancer/*.go
|
||||
|
||||
./"$PROGRAM_NAME" "$@"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/bugout-dev/moonstream/nodes/node_balancer/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cmd.CLI()
|
||||
}
|
Ładowanie…
Reference in New Issue