mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-15 00:50:25 +02:00
start mobile library with provision id and custom hostname.
This commit is contained in:
committed by
Cuong Manh Le
parent
a72ff1e769
commit
3412d1f8b9
+9
-1
@@ -182,7 +182,15 @@ func RunMobile(appConfig *AppConfig, appCallback *AppCallback, stopCh chan struc
|
||||
noConfigStart = false
|
||||
homedir = appConfig.HomeDir
|
||||
verbose = appConfig.Verbose
|
||||
cdUID = appConfig.CdUID
|
||||
if appConfig.ProvisionID != "" {
|
||||
cdOrg = appConfig.ProvisionID
|
||||
}
|
||||
if appConfig.CustomHostname != "" {
|
||||
customHostname = appConfig.CustomHostname
|
||||
}
|
||||
if appConfig.CdUID != "" {
|
||||
cdUID = appConfig.CdUID
|
||||
}
|
||||
cdUpstreamProto = appConfig.UpstreamProto
|
||||
logPath = appConfig.LogPath
|
||||
run(appCallback, stopCh)
|
||||
|
||||
+7
-5
@@ -20,11 +20,13 @@ type AppCallback struct {
|
||||
// AppConfig allows overwriting ctrld cli flags from mobile platforms.
|
||||
// This provides a clean interface for mobile apps to configure ctrld behavior
|
||||
type AppConfig struct {
|
||||
CdUID string
|
||||
HomeDir string
|
||||
UpstreamProto string
|
||||
Verbose int
|
||||
LogPath string
|
||||
CdUID string
|
||||
ProvisionID string
|
||||
CustomHostname string
|
||||
HomeDir string
|
||||
UpstreamProto string
|
||||
Verbose int
|
||||
LogPath string
|
||||
}
|
||||
|
||||
// Network and HTTP configuration constants
|
||||
|
||||
Reference in New Issue
Block a user