Versions in this module Expand all Collapse all v1 v1.2.5 Sep 23, 2024 Changes in this version + const CloudletPrometheusPort + const PrometheusContainer + const PrometheusImagePath + const PrometheusImageVersion + const PrometheusRulesPrefix + var DefaultBindAddr = "127.0.0.1:8088" + var DefaultHttpAddr = "127.0.0.1:8086" + var EtcdRamDiskSizeVar = "ETCD_RAMDISK_SIZEG" + var InfluxCredsFile = "/tmp/influx.json" + var LocalRedisPort = "6379" + var LocalRedisSentinelPort = "26379" + var MaxRamDiskSizeG = 3.0 + var RamDisk = "ramdisk" + func AddHostDockerInternal(args []string) ([]string, error) + func CheckBindOk(portsInUse map[string]string, addrs []string) error + func CleanupEtcdRamDisk() error + func CloudletPrometheusExists(ctx context.Context) bool + func CrmServiceWait(key edgeproto.CloudletKey) error + func EnsureProcessesByName(processName string, processArgs string) bool + func GetCRMCmdArgs(cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig, ...) ([]string, *map[string]string, error) + func GetCloudletLog(ctx context.Context, key *edgeproto.CloudletKey) (string, error) + func GetCloudletLogFile(filePrefix string) string + func GetCloudletPrometheusCmdArgs() []string + func GetCloudletPrometheusConfigHostFilePath() string + func GetCloudletPrometheusDockerArgs(cloudlet *edgeproto.Cloudlet, cfgFile string) []string + func GetCrmAccessKeyFile() string + func GetCrmProc(cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig, ...) (CrmProcess, []StartOp, error) + func GetDummyPrivateKey() (*os.File, error) + func GetLocalAccessKeyDir() string + func GetLocalAccessKeyFile(filePrefix string, haRole HARole) string + func GetPortsInUse() (map[string]string, error) + func GetShepherdCmdArgs(cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig) ([]string, *map[string]string, error) + func GetTypeString(p interface{}) string + func KillProcessesByName(processName string, maxwait time.Duration, processArgs string, c chan string) + func SetupInflux(dir string, ops ...InfluxOp) (string, error) + func SplitAddr(addr string) (string, string) + func StartCRMService(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) error + func StartCRMServicesHA(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) error + func StartCloudletPrometheus(ctx context.Context, remoteWriteAddr string, cloudlet *edgeproto.Cloudlet, ...) error + func StartLocal(name, bin string, args, envs []string, logfile string) (*exec.Cmd, error) + func StopCRMService(ctx context.Context, cloudlet *edgeproto.Cloudlet, haRole HARole, ...) error + func StopCloudletPrometheus(ctx context.Context) error + func StopFakeEnvoyExporters(ctx context.Context) error + func StopLocal(cmd *exec.Cmd) + func StopProcess(p Process, maxwait time.Duration, c chan string) + func StopShepherdService(ctx context.Context, cloudlet *edgeproto.Cloudlet) error + func WriteAllCAs(inputCAFile, outputCAFile string) error + func WriteCloudletPromConfig(ctx context.Context, remoteWriteAddr string, promScrapeInterval *time.Duration, ...) error + type AutoProv struct + CtrlAddrs string + InfluxAddr string + NotifyAddrs string + Region string + func (p *AutoProv) GetBindAddrs() []string + func (p *AutoProv) GetExeName() string + func (p *AutoProv) LookupArgs() string + func (p *AutoProv) StartLocal(logfile string, opts ...StartOp) error + func (p *AutoProv) StopLocal() + type CCRM struct + APIAddr string + AnsibleListenAddr string + AnsiblePublicAddr string + AppDNSRoot string + CloudletRegistryPath string + CloudletVMImagePath string + ControllerApiAddr string + ControllerNotifyAddr string + ControllerPublicAccessApiAddr string + ControllerPublicNotifyAddr string + DNSZone string + EnvoyWithCurlImage string + EtcdAddrs string + FederationExternalAddr string + NginxWithCurlImage string + Region string + TestMode bool + ThanosRecvAddr string + VersionTag string + func (p *CCRM) GetBindAddrs() []string + func (p *CCRM) GetExeName() string + func (p *CCRM) LookupArgs() string + func (p *CCRM) StartLocal(logfile string, opts ...StartOp) error + func (p *CCRM) StopLocal() + type ClusterSvc struct + CtrlAddrs string + InfluxDB string + Interval string + NotifyAddrs string + PluginRequired bool + PromPorts string + Region string + func (p *ClusterSvc) GetBindAddrs() []string + func (p *ClusterSvc) GetExeName() string + func (p *ClusterSvc) LookupArgs() string + func (p *ClusterSvc) StartLocal(logfile string, opts ...StartOp) error + func (p *ClusterSvc) StopLocal() + type ColorWriter struct + Color ct.Color + Name string + func NewColorWriter(name string) *ColorWriter + func (c *ColorWriter) Write(p []byte) (int, error) + type Common struct + DockerImage string + EnvVars map[string]string + Hostname string + Kind string + Name string + func (c *Common) GetEnv() []string + func (c *Common) GetEnvVarsP() *map[string]string + func (c *Common) GetHostname() string + func (c *Common) GetName() string + type Controller struct + ApiAddr string + AppDNSRoot string + ArtifactoryFQDN string + CheckpointInterval string + DNSZone string + EdgeTurnAddr string + EtcdAddrs string + HttpAddr string + InfluxAddr string + NotifyAddr string + NotifyParentAddrs string + NotifyRootAddrs string + PlatformServiceAddrs []string + Region string + RegistryFQDN string + TestMode bool + VersionTag string + func (p *Controller) ConnectAPI(timeout time.Duration) (*grpc.ClientConn, error) + func (p *Controller) GetBindAddrs() []string + func (p *Controller) GetExeName() string + func (p *Controller) GetTlsFile() string + func (p *Controller) LookupArgs() string + func (p *Controller) StartLocal(logfile string, opts ...StartOp) error + func (p *Controller) StopLocal() + type Crm struct + AnsiblePublicAddr string + AppDNSRoot string + CacheDir string + CloudletKey string + CloudletVMImagePath string + CommercialCerts bool + ContainerVersion string + EnvoyWithCurlImage string + HARole HARole + NginxWithCurlImage string + NotifyAddrs string + NotifySrvAddr string + PhysicalName string + Platform string + Plugin string + Region string + Span string + TestMode bool + VMImageVersion string + func (p *Crm) CrmProc() *Crm + func (p *Crm) GetArgs(opts ...StartOp) []string + func (p *Crm) GetBindAddrs() []string + func (p *Crm) GetExeName() string + func (p *Crm) LookupArgs() string + func (p *Crm) LookupArgsWithHARole(HARole HARole) string + func (p *Crm) StartLocal(logfile string, opts ...StartOp) error + func (p *Crm) StopLocal() + func (p *Crm) String(opts ...StartOp) string + func (p *Crm) Wait() error + type CrmProcess interface + CrmProc func() *Crm + type CrmServiceOp func(options *CrmServiceOptions) + func WithExeName(name string) CrmServiceOp + func WithGetCrmProc(getCrmProc GetCrmProcFunc) CrmServiceOp + type CrmServiceOptions struct + func GetCrmServiceOptions(ops ...CrmServiceOp) *CrmServiceOptions + type Dme struct + ApiAddr string + Carrier string + CloudletKey string + CookieExpr string + HttpAddr string + LocVerUrl string + NotifyAddrs string + QosPosUrl string + QosSesAddr string + Region string + TokSrvUrl string + func (p *Dme) ConnectAPI(timeout time.Duration) (*grpc.ClientConn, error) + func (p *Dme) GetBindAddrs() []string + func (p *Dme) GetExeName() string + func (p *Dme) GetRestClient(timeout time.Duration) (*http.Client, error) + func (p *Dme) LookupArgs() string + func (p *Dme) StartLocal(logfile string, opts ...StartOp) error + func (p *Dme) StopLocal() + type DockerGeneric struct + DockerEnvVars map[string]string + DockerNetwork string + Links []string + TLS TLSCerts + func (p *DockerGeneric) GetCmd() *exec.Cmd + func (p *DockerGeneric) GetExeName() string + func (p *DockerGeneric) GetRunArgs() []string + func (p *DockerGeneric) LookupArgs() string + func (p *DockerGeneric) SetCmd(cmd *exec.Cmd) + func (p *DockerGeneric) StopLocal() + type DockerNetwork struct + func (d *DockerNetwork) Create() error + func (d *DockerNetwork) Delete() error + type EdgeTurn struct + ListenAddr string + ProxyAddr string + Region string + TestMode bool + func (p *EdgeTurn) GetBindAddrs() []string + func (p *EdgeTurn) GetExeName() string + func (p *EdgeTurn) LookupArgs() string + func (p *EdgeTurn) StartLocal(logfile string, opts ...StartOp) error + func (p *EdgeTurn) StopLocal() + type ElasticSearch struct + Port string + Type string + func (p *ElasticSearch) GetBindAddrs() []string + func (p *ElasticSearch) StartElasticSearch(logfile string, opts ...StartOp) error + func (p *ElasticSearch) StartKibana(logfile string, opts ...StartOp) error + func (p *ElasticSearch) StartLocal(logfile string, opts ...StartOp) error + type Etcd struct + ClientAddrs string + DataDir string + InitialCluster string + PeerAddrs string + func (p *Etcd) GetBindAddrs() []string + func (p *Etcd) GetExeName() string + func (p *Etcd) LookupArgs() string + func (p *Etcd) ResetData() error + func (p *Etcd) StartLocal(logfile string, opts ...StartOp) error + func (p *Etcd) StopLocal() + type GetCrmProcFunc func(cloudlet *edgeproto.Cloudlet, pfConfig *edgeproto.PlatformConfig, ...) (CrmProcess, []StartOp, error) + type HARole string + var HARoleAll HARole = "all" + var HARolePrimary HARole = "primary" + var HARoleSecondary HARole = "secondary" + type Influx struct + Auth LocalAuth + BindAddr string + Config string + DataDir string + HttpAddr string + TLS TLSCerts + func (p *Influx) GetBindAddrs() []string + func (p *Influx) GetClient() (influxclient.Client, error) + func (p *Influx) GetExeName() string + func (p *Influx) LookupArgs() string + func (p *Influx) ResetData() error + func (p *Influx) StartLocal(logfile string, opts ...StartOp) (reterr error) + func (p *Influx) StopLocal() + type InfluxOp func(opts *InfluxOptions) + func WithAuth(auth bool) InfluxOp + func WithBindAddr(addr string) InfluxOp + func WithHttpAddr(addr string) InfluxOp + func WithServerCert(cert string) InfluxOp + func WithServerCertKey(key string) InfluxOp + type InfluxOptions struct + Auth bool + BindAddr string + DataDir string + HttpAddr string + TlsCertKey string + TlsCertfile string + func (s *InfluxOptions) Apply(ops ...InfluxOp) + func (s *InfluxOptions) SetDefaults(dir string) + type Jaeger struct + func (p *Jaeger) GetBindAddrs() []string + func (p *Jaeger) StartLocal(logfile string, opts ...StartOp) error + func (p *Jaeger) StartLocalNoTraefik(logfile string, opts ...StartOp) error + type LocApiSim struct + Country string + Geofile string + Locfile string + Port int + func (p *LocApiSim) GetBindAddrs() []string + func (p *LocApiSim) GetExeName() string + func (p *LocApiSim) LookupArgs() string + func (p *LocApiSim) StartLocal(logfile string, opts ...StartOp) error + func (p *LocApiSim) StopLocal() + type LocalAuth struct + Pass string + User string + type NginxProxy struct + Servers []NginxServerConfig + func (p *NginxProxy) GetBindAddrs() []string + func (p *NginxProxy) StartLocal(logfile string, opts ...StartOp) error + type NginxServerConfig struct + Port string + ServerName string + Target string + TlsPort string + type NodeCommon struct + AccessApiAddr string + AccessKeyFile string + DeploymentTag string + TLS TLSCerts + UseVaultPki bool + ValidDomains string + VaultAddr string + func (p *NodeCommon) GetNodeMgrArgs() []string + type NotifyRoot struct + NotifyAddr string + func (p *NotifyRoot) GetBindAddrs() []string + func (p *NotifyRoot) GetExeName() string + func (p *NotifyRoot) LookupArgs() string + func (p *NotifyRoot) StartLocal(logfile string, opts ...StartOp) error + func (p *NotifyRoot) StopLocal() + type Process interface + GetBindAddrs func() []string + GetEnv func() []string + GetExeName func() string + GetHostname func() string + GetName func() string + LookupArgs func() string + StartLocal func(logfile string, opts ...StartOp) error + StopLocal func() + type ProcessInfo struct + type QosSesSrvSim struct + Port int + func (p *QosSesSrvSim) GetBindAddrs() []string + func (p *QosSesSrvSim) GetExeName() string + func (p *QosSesSrvSim) LookupArgs() string + func (p *QosSesSrvSim) StartLocal(logfile string, opts ...StartOp) error + func (p *QosSesSrvSim) StopLocal() + type RedisCache struct + MasterPort string + Port string + Type string + func (p *RedisCache) GetBindAddrs() []string + func (p *RedisCache) GetExeName() string + func (p *RedisCache) LookupArgs() string + func (p *RedisCache) ResetData(logfile string) error + func (p *RedisCache) StartLocal(logfile string, opts ...StartOp) error + func (p *RedisCache) StopLocal() + type RedisClientCommon struct + RedisMasterName string + RedisSentinelAddrs string + RedisStandaloneAddr string + func (p *RedisClientCommon) GetRedisClientArgs() []string + type Shepherd struct + AppDNSRoot string + CloudletKey string + MetricsAddr string + NotifyAddrs string + PhysicalName string + Platform string + PromTargetAddr string + Region string + Span string + ThanosRecvAddr string + func StartShepherdService(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) (*Shepherd, error) + func (p *Shepherd) GetArgs(opts ...StartOp) []string + func (p *Shepherd) GetBindAddrs() []string + func (p *Shepherd) GetExeName() string + func (p *Shepherd) LookupArgs() string + func (p *Shepherd) StartLocal(logfile string, opts ...StartOp) error + func (p *Shepherd) StopLocal() + func (p *Shepherd) String(opts ...StartOp) string + func (p *Shepherd) Wait() + type StartOp func(op *StartOptions) + func WithCleanStartup() StartOp + func WithCustomExeName(exeName string) StartOp + func WithDebug(debug string) StartOp + func WithExtraArgs(params []string) StartOp + func WithNoConfig() StartOp + func WithRolesFile(rolesfile string) StartOp + type StartOptions struct + CleanStartup bool + Debug string + ExeName string + ExtraArgs []string + NoConfig bool + RolesFile string + func (s *StartOptions) ApplyStartOptions(opts ...StartOp) + type TLSCerts struct + ApiCert string + ApiKey string + CACert string + ClientCert string + ServerCert string + ServerKey string + func (s *TLSCerts) AddInternalPkiArgs(args []string) []string + type Vault struct + CADir string + CloudflareAPIKey string + DNSZone string + DmeSecret string + ListenAddr string + PKIDomain string + Regions string + RootToken string + RunCACert string + VaultDatas []VaultData + func (p *Vault) GetAppRole(region, name string, roleID, secretID *string, err *error) + func (p *Vault) GetBindAddrs() []string + func (p *Vault) GetExeName() string + func (p *Vault) LookupArgs() string + func (p *Vault) PutSecret(region, name, secret string, err *error) + func (p *Vault) PutSecretsJson(SecretsPath, jsonFile string, err *error) + func (p *Vault) Run(bin, args string, err *error) string + func (p *Vault) RunWithInput(bin, args string, input io.Reader, err *error) string + func (p *Vault) Setup(opts ...StartOp) error + func (p *Vault) StartLocal(logfile string, opts ...StartOp) error + func (p *Vault) StartLocalRoles() (*VaultRoles, error) + func (p *Vault) StopLocal() + type VaultData struct + Data map[string]string + Path string + type VaultRegionRoles struct + AutoProvRoleID string + AutoProvSecretID string + ClusterSvcRoleID string + ClusterSvcSecretID string + CtrlRoleID string + CtrlSecretID string + DmeRoleID string + DmeSecretID string + EdgeTurnRoleID string + EdgeTurnSecretID string + FrmRoleID string + FrmSecretID string + RotatorRoleID string + RotatorSecretID string + type VaultRoles struct + AlertMgrSidecarRoleID string + AlertMgrSidecarSecretID string + MCRoleID string + MCSecretID string + NotifyRootRoleID string + NotifyRootSecretID string + RegionRoles map[string]*VaultRegionRoles + RotatorRoleID string + RotatorSecretID string + func (s *VaultRoles) GetRegionRoles(region string) *VaultRegionRoles