package main import ( "tree_console" "tree_lib" // Just to load path functions _ "net/http/pprof" _ "tree_graph/get_path" ) const ( DEFAULT_PROCESS_ID_FILE = "/etc/treescale/pid" ) var ( PID_FILE = tree_lib.GetEnv("TREE_PID_FILE", DEFAULT_PROCESS_ID_FILE) ) func main() { tree_console.HandleConsoleArgs() }
import ( "github.com/boltdb/bolt" "github.com/pquerna/ffjson/ffjson" "os" "tree_event" "tree_lib" "tree_log" "tree_node/node_info" ) const ( DEFAULT_DB_FILE = "/etc/treescale/tree.db" ) var ( DB_DIR = tree_lib.GetEnv("TREE_DB_PATH", DEFAULT_DB_FILE) tree_db *bolt.DB log_from_db = "Tree Database" // Keeping different database lists DB_NODE = []byte("node") DB_BALANCER = []byte("balancer") DB_REGISTRY = []byte("registry") // Containers registry DB_RANDOM = []byte("random") // This will hold random data with Key -> Value []byte DB_GROUP = []byte("group") // Database with group name keys and node list value (t1, t2, ...) strings.Join(node_list, ",") DB_TAG = []byte("tag") // Database with tag name keys and node list value (t1, t2, ...) strings.Join(node_list, ",") DB_RELATIONS = []byte("relations") // Database for storing node relations (parent or child connections) strings.Join(node_list, ",") DB_EVENT = []byte("event") // Database for storing added custom events with their handlers with encoded Custom Event structure ) func init() {