Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Prefix = "/opt/sysinner/innerstack" Config ConfigCommon User = &user.User{ Uid: "2048", Gid: "2048", Username: "action", HomeDir: "/home/action", } InitZoneId = "z1" InitCellId = "g1" SysConfigurators = []*inapi.SysConfigurator{} DefaultUserID = 2048 DefaultGroupID = 2048 )
Functions ¶
func BasicSetup ¶
func BasicSetup() error
func IsZoneMaster ¶
func IsZoneMaster() bool
func NewConfigJob ¶
Types ¶
type ConfigCommon ¶
type ConfigCommon struct {
Host HostConfig `json:"host" toml:"host"`
Zone ZoneConfig `json:"zone" toml:"zone"`
ZoneMain *ZoneMainConfig `json:"zone_main,omitempty" toml:"zone_main,omitempty"`
IamService *iamcfg.ConfigCommon `json:"iam_service,omitempty" toml:"iam_service,omitempty"`
GlobDatabase *kvclient.Config `json:"glob_database,omitempty" toml:"glob_database,omitempty"`
ZoneDatabase *kvclient.Config `json:"zone_database,omitempty" toml:"zone_database,omitempty"`
PackDatabase *kvclient.Config `json:"pack_database,omitempty" toml:"pack_database,omitempty"`
// contains filtered or unexported fields
}
func (*ConfigCommon) Flush ¶
func (cfg *ConfigCommon) Flush() error
type HostConfig ¶
type HostConfig struct {
Id string `json:"id" toml:"id"`
ZoneId string `json:"zone_id" toml:"zone_id"`
CellId string `json:"cell_id" toml:"cell_id"`
LanAddr string `json:"lan_addr" toml:"lan_addr"`
WanAddr string `json:"wan_addr,omitempty" toml:"wan_addr,omitempty"`
SecretKey string `json:"secret_key" toml:"secret_key"`
PprofHttpPort uint16 `json:"pprof_http_port,omitempty" toml:"pprof_http_port,omitempty"`
NetworkVpcBridge string `json:"network_vpc_bridge,omitempty" toml:"network_vpc_bridge,omitempty"`
NetworkVpcInstance string `json:"network_vpc_instance,omitempty" toml:"network_vpc_instance,omitempty"`
}
type HostInfoReply ¶
type HostInfoReply struct {
ConfigCommon
Status struct {
ZoneMainNode bool `json:"zone_main_node,omitempty" toml:"zone_main_node,omitempty"`
ZoneLeader bool `json:"zone_leader,omitempty" toml:"zone_leader,omitempty"`
HostUptime int64 `json:"host_uptime,omitempty" toml:"host_uptime,omitempty"`
} `json:"status,omitempty" toml:"status,omitempty"`
JobStatus interface{} `json:"job_status,omitempty" toml:"job_status,omitempty"`
}
type HostJoinRequest ¶
type ZoneConfig ¶
type ZoneConfig struct {
InstanceId string `json:"instance_id,omitempty" toml:"instance_id,omitempty"`
ZoneId string `json:"zone_id" toml:"zone_id"`
MainNodes []string `json:"main_nodes" toml:"main_nodes"`
HttpPort uint16 `json:"http_port" toml:"http_port"`
PodHomeDir string `json:"pod_home_dir" toml:"pod_home_dir"`
ImageServices []*inapi.ResImageService `json:"image_services,omitempty" toml:"image_services,omitempty"`
InpackServiceUrl string `json:"inpack_service_url,omitempty" toml:"inpack_service_url,omitempty"`
InpanelServiceUrl string `json:"inpanel_service_url,omitempty" toml:"inpanel_service_url,omitempty"`
IamServiceUrlFrontend string `json:"iam_service_url_frontend,omitempty" toml:"iam_service_url_frontend,omitempty"`
IamServiceUrlGlobal string `json:"iam_service_url_global,omitempty" toml:"iam_service_url_global,omitempty"`
NetworkDomainName string `json:"network_domain_name,omitempty" toml:"network_domain_name,omitempty"`
}
type ZoneInitRequest ¶
type ZoneInitRequest struct {
HostAddr string `json:"host_addr" toml:"host_addr"`
ZoneId string `json:"zone_id" toml:"zone_id"`
CellId string `json:"cell_id" toml:"cell_id"`
HttpPort uint16 `json:"http_port" toml:"http_port"`
Password string `json:"password" toml:"password"`
WanAddr string `json:"wan_addr,omitempty" toml:"wan_addr,omitempty"`
}
type ZoneMainConfig ¶
type ZoneMainConfig struct {
DataTableZone string `json:"data_table_zone" toml:"data_table_zone"`
DataTableGlobal string `json:"data_table_global" toml:"data_table_global"`
DataTableInpack string `json:"data_table_inpack" toml:"data_table_inpack"`
MultiZoneEnable bool `json:"multi_zone_enable" toml:"multi_zone_enable"`
MultiCellEnable bool `json:"multi_cell_enable" toml:"multi_cell_enable"`
MultiHostEnable bool `json:"multi_host_enable" toml:"multi_host_enable"`
MultiReplicaEnable bool `json:"multi_replica_enable" toml:"multi_replica_enable"`
SchedulerPlugin string `json:"scheduler_plugin,omitempty" toml:"scheduler_plugin,omitempty"`
LocaleLang string `json:"locale_lang" toml:"locale_lang" desc:"locale language name. default: en"`
IamAccessKey *hauth.AccessKey `json:"iam_access_key,omitempty" toml:"iam_access_key,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.