Documentation ¶
Index ¶
Constants ¶
const ( // Version of gmbh{Core,Procm,Data} Version = "0.9.6" // Code name of gmbh release Code = "launching" )
const ( // Localhost string Localhost = "localhost" // ServicePort is starting port for assignment to services ServicePort = 49502 // CorePort ; the default core port CorePort = ":49500" // ProcmPort ; the default procm port ProcmPort = ":59500" // RemotePort is tarting port for assignment to procm remotes RemotePort = 59502 )
const ( // ProcmLogName for log file at Log Path ProcmLogName = "procm.log" // CoreLogName for log file at Log Path CoreLogName = "coreData.log" // StdoutExt is the extensions for stdout files StdoutExt = "-stdout.log" // DefaultServiceLogName ; DefaultServiceLogName = "stdout.log" // LogStamp for output to logs LogStamp = "06/01/02 15:04" )
const ( // NodeInterpreter ; default for node services NodeInterpreter = "/usr/local/bin/node" // NodeInterpreterAlpine ; location to node in alpine images NodeInterpreterAlpine = "/usr/bin/node" // GoInterpreter ; default for go services GoInterpreter = "/usr/local/go/bin/go" )
const Bash = `` /* 179-byte string literal not displayed */
const CheckBash = `check_error $?
`
const Compose = `` /* 258-byte string literal not displayed */
const ComposeDashboard = `
dashboard:
image: "gmbh-dashboard-image"
ports:
- "5001:5001"
logging:
driver: "none"
`
const ComposeNode = `
node_%d:
image: "gmbh-img-node_%d"%s
environment:
- "HOSTNAME=node_%d"
env_file:
- gmbh.env
`
const CoreDkr = `` /* 1060-byte string literal not displayed */
CoreDkr MUST SPECIFY THE CONFIG FILE USING SPRINTF
const Dashboard = `` /* 621-byte string literal not displayed */
const EnvFile = `ENV=C
PROCM=node_procm:59500
%s
CORE=node_0:49500
`
const EnvLog = `LOGGING=1`
const ProcMDkr = `` /* 912-byte string literal not displayed */
ProcMDkr procm dockerfile template
const ServiceDkr = `` /* 1065-byte string literal not displayed */
ServiceDkr docker template
Variables ¶
var ( // ProcmBinPathMac runtime.GOOS == darwin ProcmBinPathMac = os.Getenv("GOPATH") + "/bin/gmbhProcm" // CoreBinPathMac runtime.GOOS == darwin CoreBinPathMac = os.Getenv("GOPATH") + "/bin/gmbhCore" // ProcmBinPathLinux runtime.GOOS == linux ProcmBinPathLinux = os.Getenv("GOPATH") + "/bin/gmbhProcm" // CoreBinPathLinux runtime.GOOS == linux CoreBinPathLinux = os.Getenv("GOPATH") + "/bin/gmbhCore" )
var ( // InternalFiles is the relative path from a project config file to where // things should be stored such as manifests and logs InternalFiles = "gmbh" // LogPath is the path from the project directory in which logs should be stored LogPath = filepath.Join(InternalFiles, "logs") // ManifestPath is the path from the project directory in which manifest toml files // should be stored ManifestPath = filepath.Join(InternalFiles, "manifest") )
var DefaultSystemConfig = SystemConfig{ Core: DefaultSystemCore, Procm: DefaultSystemProcm, Service: make([]*ServiceConfig, 0), MaxPerNode: 1, }
DefaultSystemConfig is the complete default system config
var DefaultSystemCore = &SystemCore{ Mode: "local", Verbose: true, Daemon: false, Address: "localhost:49500", KeepAlive: duration{time.Second * 45}, BinPath: filepath.Join(os.Getenv("$GOPATH"), "bin", "gmbhCore"), }
DefaultSystemCore holds default core settings
var DefaultSystemProcm = &SystemProcm{ Address: "localhost:59500", KeepAlive: duration{time.Second * 45}, Verbose: true, BinPath: filepath.Join(os.Getenv("$GOPATH"), "bin", "gmbhProcm"), }
DefaultSystemProcm holds the default procm settings
Functions ¶
This section is empty.
Types ¶
type ServiceConfig ¶
type ServiceConfig struct { ID string `toml:"id"` Args []string `toml:"args"` Env []string `toml:"env"` Language string `toml:"language"` BinPath string `toml:"bin_path"` SrcPath string `toml:"src_path"` Ports []string `toml:"ports"` Interpreter string `toml:"interpreter"` EntryPoint string `toml:"entry_point"` ProjPath string }
ServiceConfig is the static data needed to launch a service from the service launcher
func ParseServices ¶ added in v0.9.3
func ParseServices(configFile string) ([]*ServiceConfig, string, error)
ParseServices returns only the services and the fingerprint
func (*ServiceConfig) Verify ¶ added in v0.9.3
func (s *ServiceConfig) Verify() error
Verify that a service config is balid
type SystemConfig ¶
type SystemConfig struct { Core *SystemCore `toml:"core"` Procm *SystemProcm `toml:"procm"` Service []*ServiceConfig `toml:"service"` Fingerprint string `toml:"fingerprint"` MaxPerNode int `toml:"max_services_per_node"` Dashboard bool `toml:"include_dashboard"` }
SystemConfig - config for gmbh
func ParseSystemConfig ¶
func ParseSystemConfig(configFile string) (*SystemConfig, error)
ParseSystemConfig parses the entire system config from the file passed in otherwise returns an error
type SystemCore ¶
type SystemCore struct { Mode string `toml:"mode"` Verbose bool `toml:"verbose"` Daemon bool `toml:"daemon"` Address string `toml:"address"` KeepAlive duration `toml:"keep_alive"` BinPath string `toml:"core_bin"` }
SystemCore stores gmbhCore settings
func ParseSystemCore ¶
func ParseSystemCore(configFile string) (*SystemCore, error)
ParseSystemCore returns only the core settings
type SystemProcm ¶
type SystemProcm struct { Address string `toml:"address"` KeepAlive duration `toml:"keep_alive"` Verbose bool `toml:"verbose"` BinPath string `toml:"core_bin"` }
SystemProcm stores gmbhProcm settings
func ParseSystemProcm ¶
func ParseSystemProcm(configFile string) (*SystemProcm, error)
ParseSystemProcm returns only the procm settings