Documentation ¶
Overview ¶
useralert config
Index ¶
- Constants
- Variables
- func AddStaticFqdn(ctx context.Context, objStore objstore.KVStore, allApis *AllApis, ...) error
- func AppInstKeyName(ctx context.Context, objStore objstore.KVStore, allApis *AllApis, ...) error
- func ControllerConnect(ctx context.Context, addr string) (*grpc.ClientConn, error)
- func CreateClusterUsageRecord(ctx context.Context, cluster *edgeproto.ClusterInst, endTime time.Time) error
- func GetAppInstID(ctx context.Context, appInst *edgeproto.AppInst, app *edgeproto.App, ...) (string, error)
- func GetPlatformVMsResources(ctx context.Context, cloudletInfo *edgeproto.CloudletInfo) ([]edgeproto.VMResource, error)
- func GetRootDir() string
- func GetRunTimeStats(usageType string, checkpoint, key interface{}, logs []client.Result, ...) error
- func InitNotify(metricsInflux *influxq.InfluxQ, edgeEventsInflux *influxq.InfluxQ, ...)
- func InstanceKeysRegionScopedName(ctx context.Context, objStore objstore.KVStore, allApis *AllApis, ...) error
- func RecordCloudletEvent(ctx context.Context, cloudletKey *edgeproto.CloudletKey, ...)
- func Run()
- func RunSingleUpgrade(ctx context.Context, objStore objstore.KVStore, allApis *AllApis, ...) error
- func StartLocalRedisServer(opts ...process.StartOp) (*process.RedisCache, error)
- func TestUpgradeExample(ctx context.Context, objStore objstore.KVStore) error
- func UpgradeCrmOnEdge(ctx context.Context, objStore objstore.KVStore, allApis *AllApis, ...) error
- func ValidateContainerName(deployment, name string) error
- type AlertApi
- func (s *AlertApi) CleanupAppInstAlerts(ctx context.Context, key *edgeproto.AppInstKey)
- func (s *AlertApi) CleanupCloudletAlerts(ctx context.Context, key *edgeproto.CloudletKey)
- func (s *AlertApi) CleanupClusterInstAlerts(ctx context.Context, key *edgeproto.ClusterKey, ...)
- func (s *AlertApi) Delete(ctx context.Context, in *edgeproto.Alert, rev int64)
- func (s *AlertApi) Flush(ctx context.Context, notifyId int64)
- func (s *AlertApi) Prune(ctx context.Context, keys map[edgeproto.AlertKey]struct{})
- func (s *AlertApi) ShowAlert(in *edgeproto.Alert, cb edgeproto.AlertApi_ShowAlertServer) error
- func (s *AlertApi) StoreDelete(ctx context.Context, in *edgeproto.Alert)
- func (s *AlertApi) StoreUpdate(ctx context.Context, old, new *edgeproto.Alert)
- func (s *AlertApi) Update(ctx context.Context, in *edgeproto.Alert, rev int64)
- type AlertPolicyApi
- func (a *AlertPolicyApi) CreateAlertPolicy(ctx context.Context, in *edgeproto.AlertPolicy) (*edgeproto.Result, error)
- func (a *AlertPolicyApi) DeleteAlertPolicy(ctx context.Context, in *edgeproto.AlertPolicy) (res *edgeproto.Result, reterr error)
- func (a *AlertPolicyApi) ShowAlertPolicy(in *edgeproto.AlertPolicy, cb edgeproto.AlertPolicyApi_ShowAlertPolicyServer) error
- func (a *AlertPolicyApi) UpdateAlertPolicy(ctx context.Context, in *edgeproto.AlertPolicy) (*edgeproto.Result, error)
- type AllApis
- func (s *AllApis) GetAlertPolicyApi() edgeproto.AlertPolicyApiServer
- func (s *AllApis) GetAppApi() edgeproto.AppApiServer
- func (s *AllApis) GetAppInstApi() edgeproto.AppInstApiServer
- func (s *AllApis) GetAutoProvPolicyApi() edgeproto.AutoProvPolicyApiServer
- func (s *AllApis) GetAutoScalePolicyApi() edgeproto.AutoScalePolicyApiServer
- func (s *AllApis) GetCloudletApi() edgeproto.CloudletApiServer
- func (s *AllApis) GetCloudletNodeApi() edgeproto.CloudletNodeApiServer
- func (s *AllApis) GetCloudletPoolApi() edgeproto.CloudletPoolApiServer
- func (s *AllApis) GetClusterInstApi() edgeproto.ClusterInstApiServer
- func (s *AllApis) GetFlavorApi() edgeproto.FlavorApiServer
- func (s *AllApis) GetGPUDriverApi() edgeproto.GPUDriverApiServer
- func (s *AllApis) GetNetworkApi() edgeproto.NetworkApiServer
- func (s *AllApis) GetOperatorCodeApi() edgeproto.OperatorCodeApiServer
- func (s *AllApis) GetResTagTableApi() edgeproto.ResTagTableApiServer
- func (s *AllApis) GetTrustPolicyApi() edgeproto.TrustPolicyApiServer
- func (s *AllApis) GetTrustPolicyExceptionApi() edgeproto.TrustPolicyExceptionApiServer
- func (s *AllApis) GetVMPoolApi() edgeproto.VMPoolApiServer
- func (s *AllApis) Start(ctx context.Context)
- func (s *AllApis) Stop()
- type AppApi
- func (s *AppApi) AddAppAlertPolicy(ctx context.Context, in *edgeproto.AppAlertPolicy) (*edgeproto.Result, error)
- func (s *AppApi) AddAppAutoProvPolicy(ctx context.Context, in *edgeproto.AppAutoProvPolicy) (*edgeproto.Result, error)
- func (s *AppApi) AndroidPackageConflicts(a *edgeproto.App) bool
- func (s *AppApi) AutoDeleteApps(ctx context.Context, key *edgeproto.FlavorKey)
- func (s *AppApi) AutoDeleteAppsForOrganization(ctx context.Context, org string)
- func (s *AppApi) CheckAppCompatibleWithTrustPolicy(ctx context.Context, ckey *edgeproto.CloudletKey, app *edgeproto.App, ...) error
- func (s *AppApi) CreateApp(ctx context.Context, in *edgeproto.App) (res *edgeproto.Result, reterr error)
- func (s *AppApi) CreateAppCheckpoint(ctx context.Context, timestamp time.Time) error
- func (s *AppApi) CreateAppUsageRecord(ctx context.Context, appInst *edgeproto.AppInst, endTime time.Time) error
- func (s *AppApi) DeleteApp(ctx context.Context, in *edgeproto.App) (res *edgeproto.Result, reterr error)
- func (s *AppApi) Get(key *edgeproto.AppKey, buf *edgeproto.App) bool
- func (s *AppApi) GetAllApps(apps map[edgeproto.AppKey]*edgeproto.App)
- func (s *AppApi) HasApp(key *edgeproto.AppKey) bool
- func (s *AppApi) RemoveAppAlertPolicy(ctx context.Context, in *edgeproto.AppAlertPolicy) (*edgeproto.Result, error)
- func (s *AppApi) RemoveAppAutoProvPolicy(ctx context.Context, in *edgeproto.AppAutoProvPolicy) (*edgeproto.Result, error)
- func (s *AppApi) ShowApp(in *edgeproto.App, cb edgeproto.AppApi_ShowAppServer) error
- func (s *AppApi) ShowCloudletsForAppDeployment(in *edgeproto.DeploymentCloudletRequest, ...) error
- func (s *AppApi) UpdateApp(ctx context.Context, in *edgeproto.App) (*edgeproto.Result, error)
- func (s *AppApi) UsesAlertPolicy(key *edgeproto.AlertPolicyKey) *edgeproto.AppKey
- func (s *AppApi) UsesAutoProvPolicy(key *edgeproto.PolicyKey) *edgeproto.AppKey
- func (s *AppApi) UsesFlavor(key *edgeproto.FlavorKey) *edgeproto.AppKey
- type AppCheckpoint
- type AppInstApi
- func (s *AppInstApi) AutoDelete(ctx context.Context, appinsts []*edgeproto.AppInst) error
- func (s *AppInstApi) AutoDeleteAppInsts(ctx context.Context, dynInsts map[edgeproto.AppInstKey]struct{}, ...) error
- func (s *AppInstApi) CheckCloudletAppinstsCompatibleWithTrustPolicy(ctx context.Context, ckey *edgeproto.CloudletKey, ...) error
- func (s *AppInstApi) CreateAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_CreateAppInstServer) error
- func (s *AppInstApi) DeleteAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_DeleteAppInstServer) error
- func (s *AppInstApi) DeleteFromInfo(ctx context.Context, in *edgeproto.AppInstInfo)
- func (s *AppInstApi) Get(key *edgeproto.AppInstKey, val *edgeproto.AppInst) bool
- func (s *AppInstApi) HandleFedAppInstEvent(ctx context.Context, in *edgeproto.FedAppInstEvent) (*edgeproto.Result, error)
- func (s *AppInstApi) HasKey(key *edgeproto.AppInstKey) bool
- func (s *AppInstApi) HealthCheckUpdate(ctx context.Context, key *edgeproto.AppInstKey, state dme.HealthCheck)
- func (s *AppInstApi) RecordAppInstEvent(ctx context.Context, appInst *edgeproto.AppInst, ...)
- func (s *AppInstApi) RefreshAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_RefreshAppInstServer) error
- func (s *AppInstApi) ReplaceErrorState(ctx context.Context, in *edgeproto.AppInst, newState edgeproto.TrackedState)
- func (s *AppInstApi) ShowAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_ShowAppInstServer) error
- func (s *AppInstApi) UpdateAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_UpdateAppInstServer) error
- func (s *AppInstApi) UpdateFromInfo(ctx context.Context, in *edgeproto.AppInstInfo)
- func (s *AppInstApi) UsesClusterInst(callerOrg string, in *edgeproto.ClusterKey) bool
- func (s *AppInstApi) UsesFlavor(key *edgeproto.FlavorKey) *edgeproto.AppInstKey
- type AppInstClientApi
- func (s *AppInstClientApi) AddAppInstClient(ctx context.Context, client *edgeproto.AppInstClient)
- func (s *AppInstClientApi) ClearRecvChan(ctx context.Context, in *edgeproto.AppInstClientKey, ...) int
- func (s *AppInstClientApi) Flush(ctx context.Context, notifyId int64)
- func (s *AppInstClientApi) Prune(ctx context.Context, keys map[edgeproto.AppInstClientKey]struct{})
- func (s *AppInstClientApi) RecvAppInstClient(ctx context.Context, client *edgeproto.AppInstClient)
- func (s *AppInstClientApi) SetRecvChan(ctx context.Context, in *edgeproto.AppInstClientKey, ...) *sync.WaitGroup
- func (s *AppInstClientApi) ShowAppInstClient(in *edgeproto.AppInstClientKey, ...) error
- func (s *AppInstClientApi) StreamAppInstClientsLocal(in *edgeproto.AppInstClientKey, ...) error
- type AppInstClientKeyApi
- func (s *AppInstClientKeyApi) Delete(ctx context.Context, in *edgeproto.AppInstClientKey, rev int64)
- func (s *AppInstClientKeyApi) Flush(ctx context.Context, notifyId int64)
- func (s *AppInstClientKeyApi) HasKey(key *edgeproto.AppInstClientKey) bool
- func (s *AppInstClientKeyApi) Prune(ctx context.Context, keys map[edgeproto.AppInstKey]struct{})
- func (s *AppInstClientKeyApi) Update(ctx context.Context, in *edgeproto.AppInstClientKey, rev int64)
- type AppInstIDSanitizer
- type AppInstInfoApi
- func (s *AppInstInfoApi) Delete(ctx context.Context, in *edgeproto.AppInstInfo, rev int64)
- func (s *AppInstInfoApi) Flush(ctx context.Context, notifyId int64)
- func (s *AppInstInfoApi) Prune(ctx context.Context, keys map[edgeproto.AppInstKey]struct{})
- func (s *AppInstInfoApi) Update(ctx context.Context, in *edgeproto.AppInstInfo, rev int64)
- type AppInstLatencyApi
- type AppInstRefKeyV1
- type AppInstRefsApi
- type AutoClusterType
- type AutoProvInfoApi
- func (s *AutoProvInfoApi) Delete(ctx context.Context, in *edgeproto.AutoProvInfo, rev int64)
- func (s *AutoProvInfoApi) Flush(ctx context.Context, notifyId int64)
- func (s *AutoProvInfoApi) Prune(ctx context.Context, keys map[edgeproto.CloudletKey]struct{})
- func (s *AutoProvInfoApi) Update(ctx context.Context, in *edgeproto.AutoProvInfo, rev int64)
- type AutoProvPolicyApi
- func (s *AutoProvPolicyApi) AddAutoProvPolicyCloudlet(ctx context.Context, in *edgeproto.AutoProvPolicyCloudlet) (*edgeproto.Result, error)
- func (s *AutoProvPolicyApi) CreateAutoProvPolicy(ctx context.Context, in *edgeproto.AutoProvPolicy) (*edgeproto.Result, error)
- func (s *AutoProvPolicyApi) DeleteAutoProvPolicy(ctx context.Context, in *edgeproto.AutoProvPolicy) (res *edgeproto.Result, reterr error)
- func (s *AutoProvPolicyApi) RecvAutoProvCounts(ctx context.Context, msg *edgeproto.AutoProvCounts)
- func (s *AutoProvPolicyApi) RemoveAutoProvPolicyCloudlet(ctx context.Context, in *edgeproto.AutoProvPolicyCloudlet) (*edgeproto.Result, error)
- func (s *AutoProvPolicyApi) STMFind(stm concurrency.STM, name, dev string, policy *edgeproto.AutoProvPolicy) error
- func (s *AutoProvPolicyApi) SetInfluxQ(influxQ *influxq.InfluxQ)
- func (s *AutoProvPolicyApi) ShowAutoProvPolicy(in *edgeproto.AutoProvPolicy, ...) error
- func (s *AutoProvPolicyApi) UpdateAutoProvPolicy(ctx context.Context, in *edgeproto.AutoProvPolicy) (*edgeproto.Result, error)
- func (s *AutoProvPolicyApi) UsesCloudlet(key *edgeproto.CloudletKey) []edgeproto.PolicyKey
- type AutoScalePolicyApi
- func (s *AutoScalePolicyApi) CreateAutoScalePolicy(ctx context.Context, in *edgeproto.AutoScalePolicy) (*edgeproto.Result, error)
- func (s *AutoScalePolicyApi) DeleteAutoScalePolicy(ctx context.Context, in *edgeproto.AutoScalePolicy) (res *edgeproto.Result, reterr error)
- func (s *AutoScalePolicyApi) ShowAutoScalePolicy(in *edgeproto.AutoScalePolicy, ...) error
- func (s *AutoScalePolicyApi) UpdateAutoScalePolicy(ctx context.Context, in *edgeproto.AutoScalePolicy) (*edgeproto.Result, error)
- type CallContext
- type CbWrapper
- type Checkpointer
- type CleanupStreamAction
- type CloudletApi
- func (s *CloudletApi) AddCloudletAllianceOrg(ctx context.Context, in *edgeproto.CloudletAllianceOrg) (*edgeproto.Result, error)
- func (s *CloudletApi) AddCloudletResMapping(ctx context.Context, in *edgeproto.CloudletResMap) (*edgeproto.Result, error)
- func (s *CloudletApi) ChangeCloudletDNS(key *edgeproto.CloudletKey, inCb edgeproto.CloudletApi_ChangeCloudletDNSServer) (reterr error)
- func (s *CloudletApi) CreateCloudlet(in *edgeproto.Cloudlet, cb edgeproto.CloudletApi_CreateCloudletServer) error
- func (s *CloudletApi) DeleteCloudlet(in *edgeproto.Cloudlet, cb edgeproto.CloudletApi_DeleteCloudletServer) error
- func (s *CloudletApi) FindFlavorMatch(ctx context.Context, in *edgeproto.FlavorMatch) (*edgeproto.FlavorMatch, error)
- func (s *CloudletApi) GenerateAccessKey(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.Result, error)
- func (s *CloudletApi) Get(key *edgeproto.CloudletKey, buf *edgeproto.Cloudlet) bool
- func (s *CloudletApi) GetAccessData(ctx context.Context, req *edgeproto.AccessDataRequest) (*edgeproto.AccessDataReply, error)
- func (s *CloudletApi) GetCas(ctx context.Context, req *edgeproto.GetCasRequest) (*edgeproto.GetCasReply, error)
- func (s *CloudletApi) GetCloudletForVMPool(vmPoolKey *edgeproto.VMPoolKey) *edgeproto.Cloudlet
- func (s *CloudletApi) GetCloudletGPUDriverLicenseConfig(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.Result, error)
- func (s *CloudletApi) GetCloudletManifest(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.CloudletManifest, error)
- func (s *CloudletApi) GetCloudletProps(ctx context.Context, in *edgeproto.CloudletProps) (*edgeproto.CloudletProps, error)
- func (s *CloudletApi) GetCloudletResourceInfo(ctx context.Context, stm concurrency.STM, cloudlet *edgeproto.Cloudlet, ...) (map[string]edgeproto.InfraResource, error)
- func (s *CloudletApi) GetCloudletResourceQuotaProps(ctx context.Context, in *edgeproto.CloudletResourceQuotaProps) (*edgeproto.CloudletResourceQuotaProps, error)
- func (s *CloudletApi) GetCloudletResourceUsage(ctx context.Context, usage *edgeproto.CloudletResourceUsage) (*edgeproto.CloudletResourceUsage, error)
- func (s *CloudletApi) GetOrganizationsOnCloudlet(in *edgeproto.CloudletKey, ...) error
- func (s *CloudletApi) GetResourceUsage(ctx context.Context, stm concurrency.STM, cloudlet *edgeproto.Cloudlet, ...) ([]edgeproto.InfraResource, error)
- func (s *CloudletApi) HasKey(key *edgeproto.CloudletKey) bool
- func (s *CloudletApi) InitVaultClient(ctx context.Context) error
- func (s *CloudletApi) IssueCert(ctx context.Context, req *edgeproto.IssueCertRequest) (*edgeproto.IssueCertReply, error)
- func (s *CloudletApi) RemoveCloudletAllianceOrg(ctx context.Context, in *edgeproto.CloudletAllianceOrg) (*edgeproto.Result, error)
- func (s *CloudletApi) RemoveCloudletResMapping(ctx context.Context, in *edgeproto.CloudletResMap) (*edgeproto.Result, error)
- func (s *CloudletApi) ReplaceErrorState(ctx context.Context, in *edgeproto.Cloudlet, newState edgeproto.TrackedState)
- func (s *CloudletApi) RevokeAccessKey(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.Result, error)
- func (s *CloudletApi) SetState(ctx context.Context, in *edgeproto.Cloudlet, newState edgeproto.TrackedState)
- func (s *CloudletApi) ShowCloudlet(in *edgeproto.Cloudlet, cb edgeproto.CloudletApi_ShowCloudletServer) error
- func (s *CloudletApi) ShowFlavorsForCloudlet(in *edgeproto.CloudletKey, ...) error
- func (s *CloudletApi) UpdateAppInstLocations(ctx context.Context, in *edgeproto.Cloudlet)
- func (s *CloudletApi) UpdateCloudlet(in *edgeproto.Cloudlet, inCb edgeproto.CloudletApi_UpdateCloudletServer) (reterr error)
- func (s *CloudletApi) UpdateCloudletsUsingTrustPolicy(ctx context.Context, trustPolicy *edgeproto.TrustPolicy, ...) error
- func (s *CloudletApi) UpgradeAccessKey(stream edgeproto.CloudletAccessKeyApi_UpgradeAccessKeyServer) error
- func (s *CloudletApi) UsesFlavor(key *edgeproto.FlavorKey) *edgeproto.CloudletKey
- func (s *CloudletApi) UsesGPUDriver(driverKey *edgeproto.GPUDriverKey) (bool, []string)
- func (s *CloudletApi) UsesPlatformFeatures(pfKey *edgeproto.PlatformFeaturesKey) (bool, []string)
- func (s *CloudletApi) UsesResTagTable(key *edgeproto.ResTagTableKey) *edgeproto.CloudletKey
- func (s *CloudletApi) UsesTrustPolicy(key *edgeproto.PolicyKey, stateMatch edgeproto.TrackedState) *edgeproto.CloudletKey
- func (s *CloudletApi) ValidateCloudletsUsingTrustPolicy(ctx context.Context, trustPolicy *edgeproto.TrustPolicy) error
- func (s *CloudletApi) VerifyTrustPoliciesForAppInsts(ctx context.Context, app *edgeproto.App, ...) error
- func (s *CloudletApi) WaitForTrustPolicyState(ctx context.Context, key *edgeproto.CloudletKey, ...) error
- type CloudletCertRefreshTaskable
- type CloudletInfoApi
- func (s *CloudletInfoApi) ClearCloudletAndAppInstDownAlerts(ctx context.Context, in *edgeproto.CloudletInfo)
- func (s *CloudletInfoApi) Del(ctx context.Context, key *edgeproto.CloudletKey, wait func(int64))
- func (s *CloudletInfoApi) Delete(ctx context.Context, in *edgeproto.CloudletInfo, rev int64)
- func (s *CloudletInfoApi) EvictCloudletInfo(ctx context.Context, in *edgeproto.CloudletInfo) (*edgeproto.Result, error)
- func (s *CloudletInfoApi) FireCloudletAndAppInstDownAlerts(ctx context.Context, in *edgeproto.CloudletInfo)
- func (s *CloudletInfoApi) Flush(ctx context.Context, notifyId int64)
- func (s *CloudletInfoApi) InjectCloudletInfo(ctx context.Context, in *edgeproto.CloudletInfo) (*edgeproto.Result, error)
- func (s *CloudletInfoApi) Prune(ctx context.Context, keys map[edgeproto.CloudletKey]struct{})
- func (s *CloudletInfoApi) ShowCloudletInfo(in *edgeproto.CloudletInfo, ...) error
- func (s *CloudletInfoApi) Update(ctx context.Context, in *edgeproto.CloudletInfo, rev int64)
- func (s *CloudletInfoApi) UpdateFields(ctx context.Context, in *edgeproto.CloudletInfo, rev int64)
- func (s *CloudletInfoApi) UpdateRPC(ctx context.Context, in *edgeproto.CloudletInfo)
- type CloudletNodeApi
- func (s *CloudletNodeApi) CreateCloudletNode(ctx context.Context, in *edgeproto.CloudletNode) (*edgeproto.Result, error)
- func (s *CloudletNodeApi) CreateCloudletNodeReq(ctx context.Context, node *edgeproto.CloudletNode) (string, error)
- func (s *CloudletNodeApi) DeleteCloudletNode(ctx context.Context, in *edgeproto.CloudletNode) (*edgeproto.Result, error)
- func (s *CloudletNodeApi) DeleteCloudletNodeReq(ctx context.Context, key *edgeproto.CloudletNodeKey) error
- func (s *CloudletNodeApi) ShowCloudletNode(in *edgeproto.CloudletNode, ...) error
- func (s *CloudletNodeApi) UpdateCloudletNode(ctx context.Context, in *edgeproto.CloudletNode) (*edgeproto.Result, error)
- type CloudletPoolApi
- func (s *CloudletPoolApi) AddCloudletPoolMember(ctx context.Context, in *edgeproto.CloudletPoolMember) (*edgeproto.Result, error)
- func (s *CloudletPoolApi) CreateCloudletPool(ctx context.Context, in *edgeproto.CloudletPool) (*edgeproto.Result, error)
- func (s *CloudletPoolApi) DeleteCloudletPool(ctx context.Context, in *edgeproto.CloudletPool) (res *edgeproto.Result, reterr error)
- func (s *CloudletPoolApi) GetCloudletPoolKeysForCloudletKey(in *edgeproto.CloudletKey) []edgeproto.CloudletPoolKey
- func (s *CloudletPoolApi) HasCloudletPool(key *edgeproto.CloudletPoolKey) bool
- func (s *CloudletPoolApi) RemoveCloudletPoolMember(ctx context.Context, in *edgeproto.CloudletPoolMember) (*edgeproto.Result, error)
- func (s *CloudletPoolApi) ShowCloudletPool(in *edgeproto.CloudletPool, ...) error
- func (s *CloudletPoolApi) UpdateCloudletPool(ctx context.Context, in *edgeproto.CloudletPool) (*edgeproto.Result, error)
- func (s *CloudletPoolApi) UsesCloudlet(key *edgeproto.CloudletKey) []edgeproto.CloudletPoolKey
- type CloudletRefsApi
- type CloudletRefsV1
- type CloudletTaskableHelper
- type ClusterCheckpoint
- type ClusterInstApi
- func (s *ClusterInstApi) CreateClusterCheckpoint(ctx context.Context, timestamp time.Time) error
- func (s *ClusterInstApi) CreateClusterInst(in *edgeproto.ClusterInst, cb edgeproto.ClusterInstApi_CreateClusterInstServer) error
- func (s *ClusterInstApi) DeleteClusterInst(in *edgeproto.ClusterInst, cb edgeproto.ClusterInstApi_DeleteClusterInstServer) error
- func (s *ClusterInstApi) DeleteFromInfo(ctx context.Context, in *edgeproto.ClusterInstInfo)
- func (s *ClusterInstApi) DeleteIdleReservableClusterInsts(ctx context.Context, in *edgeproto.IdleReservableClusterInsts) (*edgeproto.Result, error)
- func (s *ClusterInstApi) Get(key *edgeproto.ClusterKey, buf *edgeproto.ClusterInst) bool
- func (s *ClusterInstApi) GetRootLBFlavorInfo(ctx context.Context, stm concurrency.STM, cloudlet *edgeproto.Cloudlet, ...) (*edgeproto.FlavorInfo, error)
- func (s *ClusterInstApi) HasKey(key *edgeproto.ClusterKey) bool
- func (s *ClusterInstApi) RecordClusterInstEvent(ctx context.Context, cluster *edgeproto.ClusterInst, ...)
- func (s *ClusterInstApi) ReplaceErrorState(ctx context.Context, in *edgeproto.ClusterInst, ...)
- func (s *ClusterInstApi) ShowClusterInst(in *edgeproto.ClusterInst, cb edgeproto.ClusterInstApi_ShowClusterInstServer) error
- func (s *ClusterInstApi) UpdateClusterInst(in *edgeproto.ClusterInst, cb edgeproto.ClusterInstApi_UpdateClusterInstServer) error
- func (s *ClusterInstApi) UpdateFromInfo(ctx context.Context, in *edgeproto.ClusterInstInfo)
- func (s *ClusterInstApi) UsesAutoScalePolicy(key *edgeproto.PolicyKey) *edgeproto.ClusterKey
- func (s *ClusterInstApi) UsesFlavor(key *edgeproto.FlavorKey) *edgeproto.ClusterKey
- func (s *ClusterInstApi) UsesNetwork(networkKey *edgeproto.NetworkKey) *edgeproto.ClusterKey
- type ClusterInstInfoApi
- func (s *ClusterInstInfoApi) Delete(ctx context.Context, in *edgeproto.ClusterInstInfo, rev int64)
- func (s *ClusterInstInfoApi) Flush(ctx context.Context, notifyId int64)
- func (s *ClusterInstInfoApi) Prune(ctx context.Context, keys map[edgeproto.ClusterKey]struct{})
- func (s *ClusterInstInfoApi) Update(ctx context.Context, in *edgeproto.ClusterInstInfo, rev int64)
- type ClusterInstRefKeyV1
- type ClusterRefsApi
- type ControllerApi
- type ControllerMetricsReceiver
- type DebugApi
- func (s *DebugApi) DisableDebugLevels(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_DisableDebugLevelsServer) error
- func (s *DebugApi) EnableDebugLevels(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_EnableDebugLevelsServer) error
- func (s *DebugApi) RunDebug(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_RunDebugServer) error
- func (s *DebugApi) ShowDebugLevels(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_ShowDebugLevelsServer) error
- type DeviceApi
- func (s *DeviceApi) CreateDevice(ctx context.Context, in *edgeproto.Device) (*edgeproto.Result, error)
- func (s *DeviceApi) Delete(ctx context.Context, in *edgeproto.Device, rev int64)
- func (s *DeviceApi) EvictDevice(ctx context.Context, in *edgeproto.Device) (*edgeproto.Result, error)
- func (s *DeviceApi) Flush(ctx context.Context, notifyId int64)
- func (s *DeviceApi) HasDevice(key *edgeproto.DeviceKey) bool
- func (s *DeviceApi) InjectDevice(ctx context.Context, in *edgeproto.Device) (*edgeproto.Result, error)
- func (s *DeviceApi) Prune(ctx context.Context, keys map[edgeproto.DeviceKey]struct{})
- func (s *DeviceApi) ShowDevice(in *edgeproto.Device, cb edgeproto.DeviceApi_ShowDeviceServer) error
- func (s *DeviceApi) ShowDeviceReport(in *edgeproto.DeviceReport, cb edgeproto.DeviceApi_ShowDeviceReportServer) error
- func (s *DeviceApi) Update(ctx context.Context, in *edgeproto.Device, rev int64)
- type DummyInfoResponder
- func (d *DummyInfoResponder) InitDummyInfoResponder()
- func (d *DummyInfoResponder) SetPause(enable bool)
- func (d *DummyInfoResponder) SetSimulateAppCreateFailure(state bool)
- func (d *DummyInfoResponder) SetSimulateAppDeleteFailure(state bool)
- func (d *DummyInfoResponder) SetSimulateClusterCreateFailure(state bool)
- func (d *DummyInfoResponder) SetSimulateClusterDeleteFailure(state bool)
- func (d *DummyInfoResponder) SetSimulateVMPoolUpdateFailure(state bool)
- type DummyStreamout
- type ExecApi
- func (s *ExecApi) AccessCloudlet(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
- func (s *ExecApi) RecvExecRequest(ctx context.Context, msg *edgeproto.ExecRequest)
- func (s *ExecApi) RunCommand(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
- func (s *ExecApi) RunConsole(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
- func (s *ExecApi) SendLocalRequest(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
- func (s *ExecApi) ShowLogs(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
- type ExecReq
- type FlavorApi
- func (s *FlavorApi) AddFlavorRes(ctx context.Context, in *edgeproto.Flavor) (*edgeproto.Result, error)
- func (s *FlavorApi) CreateFlavor(ctx context.Context, in *edgeproto.Flavor) (*edgeproto.Result, error)
- func (s *FlavorApi) DeleteFlavor(ctx context.Context, in *edgeproto.Flavor) (res *edgeproto.Result, reterr error)
- func (s *FlavorApi) HasFlavor(key *edgeproto.FlavorKey) bool
- func (s *FlavorApi) RemoveFlavorRes(ctx context.Context, in *edgeproto.Flavor) (*edgeproto.Result, error)
- func (s *FlavorApi) ShowFlavor(in *edgeproto.Flavor, cb edgeproto.FlavorApi_ShowFlavorServer) error
- func (s *FlavorApi) UpdateFlavor(ctx context.Context, in *edgeproto.Flavor) (*edgeproto.Result, error)
- type FlowRateLimitSettingsApi
- func (r *FlowRateLimitSettingsApi) CreateFlowRateLimitSettings(ctx context.Context, in *edgeproto.FlowRateLimitSettings) (*edgeproto.Result, error)
- func (r *FlowRateLimitSettingsApi) DeleteFlowRateLimitSettings(ctx context.Context, in *edgeproto.FlowRateLimitSettings) (*edgeproto.Result, error)
- func (r *FlowRateLimitSettingsApi) ShowFlowRateLimitSettings(in *edgeproto.FlowRateLimitSettings, ...) error
- func (r *FlowRateLimitSettingsApi) ShowRateLimitSettings(in *edgeproto.RateLimitSettings, ...) error
- func (r *FlowRateLimitSettingsApi) UpdateFlowRateLimitSettings(ctx context.Context, in *edgeproto.FlowRateLimitSettings) (*edgeproto.Result, error)
- type GPUDriverApi
- func (s *GPUDriverApi) AddGPUDriverBuild(in *edgeproto.GPUDriverBuildMember, ...) (reterr error)
- func (s *GPUDriverApi) CreateGPUDriver(in *edgeproto.GPUDriver, cb edgeproto.GPUDriverApi_CreateGPUDriverServer) (reterr error)
- func (s *GPUDriverApi) DeleteGPUDriver(in *edgeproto.GPUDriver, cb edgeproto.GPUDriverApi_DeleteGPUDriverServer) error
- func (s *GPUDriverApi) GetGPUDriverBuildURL(ctx context.Context, in *edgeproto.GPUDriverBuildMember) (*edgeproto.GPUDriverBuildURL, error)
- func (s *GPUDriverApi) GetGPUDriverLicenseConfig(ctx context.Context, key *edgeproto.GPUDriverKey) (*edgeproto.Result, error)
- func (s *GPUDriverApi) RemoveGPUDriverBuild(in *edgeproto.GPUDriverBuildMember, ...) error
- func (s *GPUDriverApi) ShowGPUDriver(in *edgeproto.GPUDriver, cb edgeproto.GPUDriverApi_ShowGPUDriverServer) error
- func (s *GPUDriverApi) UpdateGPUDriver(in *edgeproto.GPUDriver, cb edgeproto.GPUDriverApi_UpdateGPUDriverServer) (reterr error)
- type GenerateResourceAlerts
- type GenericCb
- type MaxReqsRateLimitSettingsApi
- func (r *MaxReqsRateLimitSettingsApi) CreateMaxReqsRateLimitSettings(ctx context.Context, in *edgeproto.MaxReqsRateLimitSettings) (*edgeproto.Result, error)
- func (r *MaxReqsRateLimitSettingsApi) DeleteMaxReqsRateLimitSettings(ctx context.Context, in *edgeproto.MaxReqsRateLimitSettings) (*edgeproto.Result, error)
- func (r *MaxReqsRateLimitSettingsApi) ShowMaxReqsRateLimitSettings(in *edgeproto.MaxReqsRateLimitSettings, ...) error
- func (r *MaxReqsRateLimitSettingsApi) UpdateMaxReqsRateLimitSettings(ctx context.Context, in *edgeproto.MaxReqsRateLimitSettings) (*edgeproto.Result, error)
- type NameSanitizer
- type NetworkApi
- func (s *NetworkApi) CreateNetwork(in *edgeproto.Network, cb edgeproto.NetworkApi_CreateNetworkServer) error
- func (s *NetworkApi) DeleteNetwork(in *edgeproto.Network, cb edgeproto.NetworkApi_DeleteNetworkServer) (reterr error)
- func (s *NetworkApi) ShowNetwork(in *edgeproto.Network, cb edgeproto.NetworkApi_ShowNetworkServer) error
- func (s *NetworkApi) UpdateNetwork(in *edgeproto.Network, cb edgeproto.NetworkApi_UpdateNetworkServer) error
- func (s *NetworkApi) UsesCloudlet(in *edgeproto.CloudletKey) *edgeproto.NetworkKey
- type NodeApi
- type OperatorCodeApi
- func (s *OperatorCodeApi) CreateOperatorCode(ctx context.Context, in *edgeproto.OperatorCode) (*edgeproto.Result, error)
- func (s *OperatorCodeApi) DeleteOperatorCode(ctx context.Context, in *edgeproto.OperatorCode) (*edgeproto.Result, error)
- func (s *OperatorCodeApi) ShowOperatorCode(in *edgeproto.OperatorCode, ...) error
- type OrganizationApi
- type PeriodicData
- type PeriodicReservableClusterInstCleanup
- type PlatformFeaturesApi
- func (s *PlatformFeaturesApi) Delete(ctx context.Context, in *edgeproto.PlatformFeatures, rev int64)
- func (s *PlatformFeaturesApi) DeletePlatformFeatures(ctx context.Context, in *edgeproto.PlatformFeatures) (res *edgeproto.Result, reterr error)
- func (s *PlatformFeaturesApi) FeaturesByPlatform() map[string]edgeproto.PlatformFeatures
- func (s *PlatformFeaturesApi) Flush(ctx context.Context, notifyId int64)
- func (s *PlatformFeaturesApi) GetCloudletFeatures(ctx context.Context, platformType string) (*edgeproto.PlatformFeatures, error)
- func (s *PlatformFeaturesApi) Prune(ctx context.Context, keys map[edgeproto.PlatformFeaturesKey]struct{})
- func (s *PlatformFeaturesApi) ShowPlatformFeatures(in *edgeproto.PlatformFeatures, ...) error
- func (s *PlatformFeaturesApi) Update(ctx context.Context, in *edgeproto.PlatformFeatures, rev int64)
- type RateLimitSettingsApi
- type ResTagTableApi
- func (s *ResTagTableApi) AddGpuResourceHintIfNeeded(ctx context.Context, stm concurrency.STM, spec *vmspec.VMCreationSpec, ...) string
- func (s *ResTagTableApi) AddResTag(ctx context.Context, in *edgeproto.ResTagTable) (*edgeproto.Result, error)
- func (s *ResTagTableApi) CreateResTagTable(ctx context.Context, in *edgeproto.ResTagTable) (*edgeproto.Result, error)
- func (s *ResTagTableApi) DeleteResTagTable(ctx context.Context, in *edgeproto.ResTagTable) (res *edgeproto.Result, reterr error)
- func (s *ResTagTableApi) GetCloudletResourceMap(ctx context.Context, stm concurrency.STM, key *edgeproto.ResTagTableKey) (*edgeproto.ResTagTable, error)
- func (s *ResTagTableApi) GetResTablesForCloudlet(ctx context.Context, stm concurrency.STM, cl *edgeproto.Cloudlet) (tables map[string]*edgeproto.ResTagTable, err error)
- func (s *ResTagTableApi) GetResTagTable(ctx context.Context, in *edgeproto.ResTagTableKey) (*edgeproto.ResTagTable, error)
- func (s *ResTagTableApi) GetVMSpec(ctx context.Context, stm concurrency.STM, nodeflavor edgeproto.Flavor, ...) (*vmspec.VMCreationSpec, error)
- func (s *ResTagTableApi) RemoveResTag(ctx context.Context, in *edgeproto.ResTagTable) (*edgeproto.Result, error)
- func (s *ResTagTableApi) ShowResTagTable(in *edgeproto.ResTagTable, cb edgeproto.ResTagTableApi_ShowResTagTableServer) error
- func (s *ResTagTableApi) UpdateResTagTable(ctx context.Context, in *edgeproto.ResTagTable) (*edgeproto.Result, error)
- func (s *ResTagTableApi) UsesGpu(ctx context.Context, stm concurrency.STM, flavor edgeproto.FlavorInfo, ...) bool
- func (s *ResTagTableApi) ValidateOptResMapValues(resmap map[string]string) (bool, error)
- func (s *ResTagTableApi) ValidateResName(ctx context.Context, in string) (error, bool)
- type RunTimeStats
- type Services
- type SettingsApi
- func (s *SettingsApi) Get() *edgeproto.Settings
- func (s *SettingsApi) ResetSettings(ctx context.Context, in *edgeproto.Settings) (*edgeproto.Result, error)
- func (s *SettingsApi) ShowSettings(ctx context.Context, in *edgeproto.Settings) (*edgeproto.Settings, error)
- func (s *SettingsApi) UpdateSettings(ctx context.Context, in *edgeproto.Settings) (*edgeproto.Result, error)
- type StreamObjApi
- func (s *StreamObjApi) StreamAppInst(key *edgeproto.AppInstKey, cb edgeproto.StreamObjApi_StreamAppInstServer) error
- func (s *StreamObjApi) StreamCloudlet(key *edgeproto.CloudletKey, cb edgeproto.StreamObjApi_StreamCloudletServer) error
- func (s *StreamObjApi) StreamClusterInst(key *edgeproto.ClusterKey, cb edgeproto.StreamObjApi_StreamClusterInstServer) error
- func (s *StreamObjApi) StreamGPUDriver(key *edgeproto.GPUDriverKey, cb edgeproto.StreamObjApi_StreamGPUDriverServer) error
- func (s *StreamObjApi) StreamMsgs(ctx context.Context, streamKey string, ...) error
- func (s *StreamObjApi) UpdateStatus(ctx context.Context, obj interface{}, state *edgeproto.TrackedState, ...)
- type StreamOp
- type StreamOptions
- type StreamoutCb
- type SyncLeaseData
- type TrustPolicyApi
- func (s *TrustPolicyApi) CreateTrustPolicy(in *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_CreateTrustPolicyServer) error
- func (s *TrustPolicyApi) DeleteTrustPolicy(in *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_DeleteTrustPolicyServer) (reterr error)
- func (s *TrustPolicyApi) GetTrustPolicies(policies map[edgeproto.PolicyKey]*edgeproto.TrustPolicy)
- func (s *TrustPolicyApi) ShowTrustPolicy(in *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_ShowTrustPolicyServer) error
- func (s *TrustPolicyApi) UpdateTrustPolicy(in *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_UpdateTrustPolicyServer) error
- type TrustPolicyExceptionApi
- func (s *TrustPolicyExceptionApi) CreateTrustPolicyException(ctx context.Context, in *edgeproto.TrustPolicyException) (*edgeproto.Result, error)
- func (s *TrustPolicyExceptionApi) DeleteTrustPolicyException(ctx context.Context, in *edgeproto.TrustPolicyException) (*edgeproto.Result, error)
- func (s *TrustPolicyExceptionApi) GetTrustPolicyExceptionForAppKey(appKey *edgeproto.AppKey) *edgeproto.TrustPolicyException
- func (s *TrustPolicyExceptionApi) GetTrustPolicyExceptionForCloudletPoolKey(cKey *edgeproto.CloudletPoolKey) *edgeproto.TrustPolicyException
- func (s *TrustPolicyExceptionApi) GetTrustPolicyExceptionRules(ckey *edgeproto.CloudletPoolKey, appKey *edgeproto.AppKey) []*edgeproto.SecurityRule
- func (s *TrustPolicyExceptionApi) ShowTrustPolicyException(in *edgeproto.TrustPolicyException, ...) error
- func (s *TrustPolicyExceptionApi) TrustPolicyExceptionForAppKeyExists(appKey *edgeproto.AppKey) *edgeproto.TrustPolicyExceptionKey
- func (s *TrustPolicyExceptionApi) TrustPolicyExceptionForCloudletPoolKeyExists(cKey *edgeproto.CloudletPoolKey) *edgeproto.TrustPolicyExceptionKey
- func (s *TrustPolicyExceptionApi) UpdateTrustPolicyException(ctx context.Context, in *edgeproto.TrustPolicyException) (res *edgeproto.Result, reterr error)
- type UpgradeSupport
- type VMPoolApi
- func (s *VMPoolApi) AddVMPoolMember(ctx context.Context, in *edgeproto.VMPoolMember) (*edgeproto.Result, error)
- func (s *VMPoolApi) CreateVMPool(ctx context.Context, in *edgeproto.VMPool) (*edgeproto.Result, error)
- func (s *VMPoolApi) DeleteVMPool(ctx context.Context, in *edgeproto.VMPool) (res *edgeproto.Result, reterr error)
- func (s *VMPoolApi) RemoveVMPoolMember(ctx context.Context, in *edgeproto.VMPoolMember) (*edgeproto.Result, error)
- func (s *VMPoolApi) ShowVMPool(in *edgeproto.VMPool, cb edgeproto.VMPoolApi_ShowVMPoolServer) error
- func (s *VMPoolApi) UpdateFromInfo(ctx context.Context, in *edgeproto.VMPoolInfo)
- func (s *VMPoolApi) UpdateVMPool(ctx context.Context, in *edgeproto.VMPool) (*edgeproto.Result, error)
- type VMPoolInfoApi
- func (s *VMPoolInfoApi) Delete(ctx context.Context, in *edgeproto.VMPoolInfo, rev int64)
- func (s *VMPoolInfoApi) Flush(ctx context.Context, notifyId int64)
- func (s *VMPoolInfoApi) Prune(ctx context.Context, keys map[edgeproto.VMPoolKey]struct{})
- func (s *VMPoolInfoApi) Update(ctx context.Context, in *edgeproto.VMPoolInfo, rev int64)
- type VaultRoles
- type VersionUpgrade
- type VersionUpgradeFunc
Constants ¶
const ( CloudletCertRefreshTaskKey = "CloudletCertRefreshTask" CloudletResourceRefreshTaskKey = "CloudletResourceRefreshTask" )
const ( PlatformInitTimeout = 20 * time.Minute DefaultResourceAlertThreshold = 80 // percentage )
const ( NoGenResourceAlerts = 0 GenResourceAlerts = 1 )
const ( ToggleFlavorMatchVerbose = "toggle-flavormatch-verbose" ShowControllers = "show-controllers" )
const ( // For K8s/Docker based Apps ShortTimeout = edgeproto.Duration(6 * time.Second) // For VM based Apps LongTimeout = edgeproto.Duration(60 * time.Second) )
const ( GPUDriverBuildURLValidity = 20 * time.Minute ChangeInProgress = "ChangeInProgress" AllCloudlets = "" )
const ( DataModelVersion0Prefix = "Version" DataModelVersion2Prefix = "VersionV2" )
DataModelVersion0's db value is a string which was the hash value. DataModelVersion2's db value is the JSON of edgeproto.DataModelVersion.
const DummyInfoDelay = 10 * time.Millisecond
Add in a little day to allow intermediate state changes to be seen. But don't add too much because it increases the unit test run time.
const NotifyChangeMaxLen = int64(200)
Variables ¶
var ( StreamMsgKeyID = "id" StreamMsgKeyModRev = "modRev" StreamMsgTypeMessage = "message" StreamMsgTypeError = "error" StreamMsgTypeSOM = "start-of-stream-message" StreamMsgTypeEOM = "end-of-stream-message" StreamMsgTypeInfoEOM = "end-of-info-stream-message" StreamMsgReadTimeout = 30 * time.Minute StreamMsgInfoReadTimeout = 3 * time.Second )
var ActionInProgressMsg = "action is already in progress"
var AppUsageInfluxQueryTemplate = `SELECT %s from "%s" WHERE ` + getInfluxQueryWhere(cloudcommon.AppInstEventSelectors) + ` AND time >= '%s' AND time < '%s' order by time desc`
var ClusterUsageInfluxQueryTemplate = `SELECT %s from "%s" WHERE ` + getInfluxQueryWhere(cloudcommon.ClusterInstEventSelectors) + ` %sAND time >= '%s' AND time < '%s' order by time desc`
var ControllerCreatedAlerts = "ControllerCreatedAlerts"
var ControllerId = ""
var CreateAppInstTransitions = map[edgeproto.TrackedState]struct{}{ edgeproto.TrackedState_CREATING: struct{}{}, }
Transition states indicate states in which the CRM is still busy.
var CreateCheckpointInfluxQueryTemplate = `SELECT %s from "%s" WHERE time >= '%s' AND time < '%s' order by time desc`
var CreateCloudletTransitions = map[dme.CloudletState]struct{}{}
Transition states indicate states in which the CRM is still busy.
var CreateClusterInstTransitions = map[edgeproto.TrackedState]struct{}{ edgeproto.TrackedState_CREATING: struct{}{}, }
Transition states indicate states in which the CRM is still busy.
var DeleteAppInstTransitions = map[edgeproto.TrackedState]struct{}{ edgeproto.TrackedState_DELETING: struct{}{}, }
var DeleteClusterInstTransitions = map[edgeproto.TrackedState]struct{}{ edgeproto.TrackedState_DELETING: struct{}{}, }
var ErrCtrlAlreadyInProgress = errors.New("Change already in progress")
var ErrCtrlUpgradeRequired = errors.New("data mode upgrade required")
var GetCheckpointInfluxQueryTemplate = `SELECT %s from "%s" WHERE "org"='%s' AND time <= '%s' order by time desc`
var InfluxDBName = cloudcommon.DeveloperMetricsDbName
var InfluxMaximumTimestamp, _ = time.Parse(time.RFC3339, "2262-04-11T23:47:15Z")
var InfluxMinimumTimestamp, _ = time.Parse(time.RFC3339, "1677-09-21T00:13:44Z")
influx timestamp ranges can handle (64-bit int min in time form)
var NextCheckpoint = InfluxMaximumTimestamp //for unit tests, so getClusterCheckpoint will never sleep
var ObjBusyDeletionMsg = "busy, cannot be deleted"
var PrevCheckpoint = InfluxMinimumTimestamp
var RequireAppInstPortConsistency = false
var UpdateAppInstTransitions = map[edgeproto.TrackedState]struct{}{ edgeproto.TrackedState_UPDATING: struct{}{}, }
var UpdateCloudletTransitions = map[dme.CloudletState]struct{}{ dme.CloudletState_CLOUDLET_STATE_UPGRADE: struct{}{}, }
var UpdateClusterInstTransitions = map[edgeproto.TrackedState]struct{}{ edgeproto.TrackedState_UPDATING: struct{}{}, }
var UpdateVMPoolTransitions = map[edgeproto.TrackedState]struct{}{ edgeproto.TrackedState_UPDATING: struct{}{}, }
Transition states indicate states in which the CRM is still busy.
var VersionHash_UpgradeFuncs = []VersionUpgrade{ {0, "d41d8cd98f00b204e9800998ecf8427e", nil, ""}, {52, "c2d882033b0c14f28cece41cf4010060", nil, ""}, {53, "14ae4c721c1bace6e8379d0061a72a77", UpgradeCrmOnEdge, "UpgradeCrmOnEdge"}, {54, "eff9d3a6c74fd02840efce05d1984e8d", AddStaticFqdn, "AddStaticFqdn"}, {55, "eac56710c013d954db31eeb306b514a4", InstanceKeysRegionScopedName, "InstanceKeysRegionScopedName"}, }
Functions ¶
func AddStaticFqdn ¶
func AppInstKeyName ¶
func AppInstKeyName(ctx context.Context, objStore objstore.KVStore, allApis *AllApis, sup *UpgradeSupport, dbModelID int32) error
AppInstKeyName fixes an issue with the original AppInstKeyName upgrade function which failed to upgrade ClusterRefs properly, as it was looking for the wrong AppInst ref format.
func ControllerConnect ¶
func GetAppInstID ¶
func GetAppInstID(ctx context.Context, appInst *edgeproto.AppInst, app *edgeproto.App, salt string, sanitizer NameSanitizer) (string, error)
GetAppInstID returns a string for this AppInst that is likely to be unique within the region. It does not guarantee uniqueness. The delimiter '.' is removed from the AppInstId so that it can be used to append further strings to this ID to build derived unique names. Salt can be used by the caller to add an extra field if needed to ensure uniqueness. In all cases, any requirements for uniqueness must be guaranteed by the caller. Name sanitization for the platform is performed
func GetPlatformVMsResources ¶
func GetPlatformVMsResources(ctx context.Context, cloudletInfo *edgeproto.CloudletInfo) ([]edgeproto.VMResource, error)
func GetRootDir ¶
func GetRootDir() string
func GetRunTimeStats ¶
func GetRunTimeStats(usageType string, checkpoint, key interface{}, logs []client.Result, stats *RunTimeStats) error
func InitNotify ¶
func InstanceKeysRegionScopedName ¶
func InstanceKeysRegionScopedName(ctx context.Context, objStore objstore.KVStore, allApis *AllApis, sup *UpgradeSupport, dbModelID int32) error
InstanceKeysRegionScopedName deals with moving the CloudletKey out of the AppInst/ClusterInst Key and onto the object body, changing the unique key. Also, this requires the instance name to be unique within the entire region instead of within a cloudlet scope.
func RecordCloudletEvent ¶
func RecordCloudletEvent(ctx context.Context, cloudletKey *edgeproto.CloudletKey, event cloudcommon.InstanceEvent, serverStatus string)
func RunSingleUpgrade ¶
func RunSingleUpgrade(ctx context.Context, objStore objstore.KVStore, allApis *AllApis, upgradeSupport *UpgradeSupport, fn VersionUpgradeFunc, upgradeID int32) error
Helper function to run a single upgrade function across all the elements of a KVStore fn will be called for each of the entries, and therefore it's up to the fn implementation to filter based on the prefix
func StartLocalRedisServer ¶
func StartLocalRedisServer(opts ...process.StartOp) (*process.RedisCache, error)
func TestUpgradeExample ¶
func UpgradeCrmOnEdge ¶
func ValidateContainerName ¶
Types ¶
type AlertApi ¶
type AlertApi struct {
// contains filtered or unexported fields
}
func NewAlertApi ¶
func NewAlertApi(sync *regiondata.Sync, all *AllApis) *AlertApi
func (*AlertApi) CleanupAppInstAlerts ¶
func (s *AlertApi) CleanupAppInstAlerts(ctx context.Context, key *edgeproto.AppInstKey)
func (*AlertApi) CleanupCloudletAlerts ¶
func (s *AlertApi) CleanupCloudletAlerts(ctx context.Context, key *edgeproto.CloudletKey)
func (*AlertApi) CleanupClusterInstAlerts ¶
func (s *AlertApi) CleanupClusterInstAlerts(ctx context.Context, key *edgeproto.ClusterKey, cloudletKey *edgeproto.CloudletKey)
func (*AlertApi) StoreDelete ¶
func (*AlertApi) StoreUpdate ¶
type AlertPolicyApi ¶
type AlertPolicyApi struct {
// contains filtered or unexported fields
}
Should only be one of these instantiated in main
func NewAlertPolicyApi ¶
func NewAlertPolicyApi(sync *regiondata.Sync, all *AllApis) *AlertPolicyApi
func (*AlertPolicyApi) CreateAlertPolicy ¶
func (a *AlertPolicyApi) CreateAlertPolicy(ctx context.Context, in *edgeproto.AlertPolicy) (*edgeproto.Result, error)
func (*AlertPolicyApi) DeleteAlertPolicy ¶
func (a *AlertPolicyApi) DeleteAlertPolicy(ctx context.Context, in *edgeproto.AlertPolicy) (res *edgeproto.Result, reterr error)
func (*AlertPolicyApi) ShowAlertPolicy ¶
func (a *AlertPolicyApi) ShowAlertPolicy(in *edgeproto.AlertPolicy, cb edgeproto.AlertPolicyApi_ShowAlertPolicyServer) error
func (*AlertPolicyApi) UpdateAlertPolicy ¶
func (a *AlertPolicyApi) UpdateAlertPolicy(ctx context.Context, in *edgeproto.AlertPolicy) (*edgeproto.Result, error)
type AllApis ¶
type AllApis struct {
// contains filtered or unexported fields
}
func NewAllApis ¶
func NewAllApis(sync *regiondata.Sync) *AllApis
func (*AllApis) GetAlertPolicyApi ¶
func (s *AllApis) GetAlertPolicyApi() edgeproto.AlertPolicyApiServer
func (*AllApis) GetAppApi ¶
func (s *AllApis) GetAppApi() edgeproto.AppApiServer
func (*AllApis) GetAppInstApi ¶
func (s *AllApis) GetAppInstApi() edgeproto.AppInstApiServer
func (*AllApis) GetAutoProvPolicyApi ¶
func (s *AllApis) GetAutoProvPolicyApi() edgeproto.AutoProvPolicyApiServer
func (*AllApis) GetAutoScalePolicyApi ¶
func (s *AllApis) GetAutoScalePolicyApi() edgeproto.AutoScalePolicyApiServer
func (*AllApis) GetCloudletApi ¶
func (s *AllApis) GetCloudletApi() edgeproto.CloudletApiServer
func (*AllApis) GetCloudletNodeApi ¶
func (s *AllApis) GetCloudletNodeApi() edgeproto.CloudletNodeApiServer
func (*AllApis) GetCloudletPoolApi ¶
func (s *AllApis) GetCloudletPoolApi() edgeproto.CloudletPoolApiServer
func (*AllApis) GetClusterInstApi ¶
func (s *AllApis) GetClusterInstApi() edgeproto.ClusterInstApiServer
func (*AllApis) GetFlavorApi ¶
func (s *AllApis) GetFlavorApi() edgeproto.FlavorApiServer
func (*AllApis) GetGPUDriverApi ¶
func (s *AllApis) GetGPUDriverApi() edgeproto.GPUDriverApiServer
func (*AllApis) GetNetworkApi ¶
func (s *AllApis) GetNetworkApi() edgeproto.NetworkApiServer
func (*AllApis) GetOperatorCodeApi ¶
func (s *AllApis) GetOperatorCodeApi() edgeproto.OperatorCodeApiServer
func (*AllApis) GetResTagTableApi ¶
func (s *AllApis) GetResTagTableApi() edgeproto.ResTagTableApiServer
func (*AllApis) GetTrustPolicyApi ¶
func (s *AllApis) GetTrustPolicyApi() edgeproto.TrustPolicyApiServer
func (*AllApis) GetTrustPolicyExceptionApi ¶
func (s *AllApis) GetTrustPolicyExceptionApi() edgeproto.TrustPolicyExceptionApiServer
func (*AllApis) GetVMPoolApi ¶
func (s *AllApis) GetVMPoolApi() edgeproto.VMPoolApiServer
type AppApi ¶
type AppApi struct {
// contains filtered or unexported fields
}
Should only be one of these instantiated in main
func (*AppApi) AddAppAlertPolicy ¶
func (*AppApi) AddAppAutoProvPolicy ¶
func (*AppApi) AndroidPackageConflicts ¶
AndroidPackageConflicts returns true if an app with a different developer+name has the same package. It is expect that different versions of the same app with the same package however so we do not do a full key comparison
func (*AppApi) AutoDeleteApps ¶
func (*AppApi) AutoDeleteAppsForOrganization ¶
func (*AppApi) CheckAppCompatibleWithTrustPolicy ¶
func (s *AppApi) CheckAppCompatibleWithTrustPolicy(ctx context.Context, ckey *edgeproto.CloudletKey, app *edgeproto.App, trustPolicy *edgeproto.TrustPolicy) error
func (*AppApi) CreateAppCheckpoint ¶
This is checkpointing for all appinsts
func (*AppApi) CreateAppUsageRecord ¶
func (*AppApi) RemoveAppAlertPolicy ¶
func (*AppApi) RemoveAppAutoProvPolicy ¶
func (*AppApi) ShowCloudletsForAppDeployment ¶
func (s *AppApi) ShowCloudletsForAppDeployment(in *edgeproto.DeploymentCloudletRequest, cb edgeproto.AppApi_ShowCloudletsForAppDeploymentServer) error
func (*AppApi) UsesAlertPolicy ¶
func (s *AppApi) UsesAlertPolicy(key *edgeproto.AlertPolicyKey) *edgeproto.AppKey
func (*AppApi) UsesAutoProvPolicy ¶
type AppCheckpoint ¶
type AppCheckpoint struct { Timestamp time.Time Org string Keys []*edgeproto.AppInstKey Status []string // either cloudcommon.InstanceUp or cloudcommon.InstanceDown }
func GetAppCheckpoint ¶
returns all the checkpointed appinsts of the most recent checkpoint with regards to timestamp
type AppInstApi ¶
type AppInstApi struct {
// contains filtered or unexported fields
}
func NewAppInstApi ¶
func NewAppInstApi(sync *regiondata.Sync, all *AllApis) *AppInstApi
func (*AppInstApi) AutoDelete ¶
func (*AppInstApi) AutoDeleteAppInsts ¶
func (s *AppInstApi) AutoDeleteAppInsts(ctx context.Context, dynInsts map[edgeproto.AppInstKey]struct{}, crmoverride edgeproto.CRMOverride, cb edgeproto.ClusterInstApi_DeleteClusterInstServer) error
func (*AppInstApi) CheckCloudletAppinstsCompatibleWithTrustPolicy ¶
func (s *AppInstApi) CheckCloudletAppinstsCompatibleWithTrustPolicy(ctx context.Context, ckey *edgeproto.CloudletKey, TrustPolicy *edgeproto.TrustPolicy) error
func (*AppInstApi) CreateAppInst ¶
func (s *AppInstApi) CreateAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_CreateAppInstServer) error
func (*AppInstApi) DeleteAppInst ¶
func (s *AppInstApi) DeleteAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_DeleteAppInstServer) error
func (*AppInstApi) DeleteFromInfo ¶
func (s *AppInstApi) DeleteFromInfo(ctx context.Context, in *edgeproto.AppInstInfo)
func (*AppInstApi) Get ¶
func (s *AppInstApi) Get(key *edgeproto.AppInstKey, val *edgeproto.AppInst) bool
func (*AppInstApi) HandleFedAppInstEvent ¶
func (s *AppInstApi) HandleFedAppInstEvent(ctx context.Context, in *edgeproto.FedAppInstEvent) (*edgeproto.Result, error)
Handle AppInst status callbacks from Federation Partner
func (*AppInstApi) HasKey ¶
func (s *AppInstApi) HasKey(key *edgeproto.AppInstKey) bool
func (*AppInstApi) HealthCheckUpdate ¶
func (s *AppInstApi) HealthCheckUpdate(ctx context.Context, key *edgeproto.AppInstKey, state dme.HealthCheck)
func (*AppInstApi) RecordAppInstEvent ¶
func (s *AppInstApi) RecordAppInstEvent(ctx context.Context, appInst *edgeproto.AppInst, event cloudcommon.InstanceEvent, serverStatus string)
func (*AppInstApi) RefreshAppInst ¶
func (s *AppInstApi) RefreshAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_RefreshAppInstServer) error
func (*AppInstApi) ReplaceErrorState ¶
func (s *AppInstApi) ReplaceErrorState(ctx context.Context, in *edgeproto.AppInst, newState edgeproto.TrackedState)
func (*AppInstApi) ShowAppInst ¶
func (s *AppInstApi) ShowAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_ShowAppInstServer) error
func (*AppInstApi) UpdateAppInst ¶
func (s *AppInstApi) UpdateAppInst(in *edgeproto.AppInst, cb edgeproto.AppInstApi_UpdateAppInstServer) error
func (*AppInstApi) UpdateFromInfo ¶
func (s *AppInstApi) UpdateFromInfo(ctx context.Context, in *edgeproto.AppInstInfo)
func (*AppInstApi) UsesClusterInst ¶
func (s *AppInstApi) UsesClusterInst(callerOrg string, in *edgeproto.ClusterKey) bool
func (*AppInstApi) UsesFlavor ¶
func (s *AppInstApi) UsesFlavor(key *edgeproto.FlavorKey) *edgeproto.AppInstKey
type AppInstClientApi ¶
type AppInstClientApi struct {
// contains filtered or unexported fields
}
func NewAppInstClientApi ¶
func NewAppInstClientApi(all *AllApis) *AppInstClientApi
func (*AppInstClientApi) AddAppInstClient ¶
func (s *AppInstClientApi) AddAppInstClient(ctx context.Context, client *edgeproto.AppInstClient)
func (*AppInstClientApi) ClearRecvChan ¶
func (s *AppInstClientApi) ClearRecvChan(ctx context.Context, in *edgeproto.AppInstClientKey, ch chan edgeproto.AppInstClient) int
Returns number of channels in the list that are left
func (*AppInstClientApi) Flush ¶
func (s *AppInstClientApi) Flush(ctx context.Context, notifyId int64)
func (*AppInstClientApi) Prune ¶
func (s *AppInstClientApi) Prune(ctx context.Context, keys map[edgeproto.AppInstClientKey]struct{})
func (*AppInstClientApi) RecvAppInstClient ¶
func (s *AppInstClientApi) RecvAppInstClient(ctx context.Context, client *edgeproto.AppInstClient)
func (*AppInstClientApi) SetRecvChan ¶
func (s *AppInstClientApi) SetRecvChan(ctx context.Context, in *edgeproto.AppInstClientKey, ch chan edgeproto.AppInstClient) *sync.WaitGroup
func (*AppInstClientApi) ShowAppInstClient ¶
func (s *AppInstClientApi) ShowAppInstClient(in *edgeproto.AppInstClientKey, cb edgeproto.AppInstClientApi_ShowAppInstClientServer) error
func (*AppInstClientApi) StreamAppInstClientsLocal ¶
func (s *AppInstClientApi) StreamAppInstClientsLocal(in *edgeproto.AppInstClientKey, cb edgeproto.AppInstClientApi_StreamAppInstClientsLocalServer) error
type AppInstClientKeyApi ¶
type AppInstClientKeyApi struct {
// contains filtered or unexported fields
}
func NewAppInstClientKeyApi ¶
func NewAppInstClientKeyApi(sync *regiondata.Sync, all *AllApis) *AppInstClientKeyApi
func (*AppInstClientKeyApi) Delete ¶
func (s *AppInstClientKeyApi) Delete(ctx context.Context, in *edgeproto.AppInstClientKey, rev int64)
func (*AppInstClientKeyApi) Flush ¶
func (s *AppInstClientKeyApi) Flush(ctx context.Context, notifyId int64)
func (*AppInstClientKeyApi) HasKey ¶
func (s *AppInstClientKeyApi) HasKey(key *edgeproto.AppInstClientKey) bool
func (*AppInstClientKeyApi) Prune ¶
func (s *AppInstClientKeyApi) Prune(ctx context.Context, keys map[edgeproto.AppInstKey]struct{})
func (*AppInstClientKeyApi) Update ¶
func (s *AppInstClientKeyApi) Update(ctx context.Context, in *edgeproto.AppInstClientKey, rev int64)
type AppInstIDSanitizer ¶
type AppInstIDSanitizer struct {
// contains filtered or unexported fields
}
func NewAppInstIDSanitizer ¶
func NewAppInstIDSanitizer(ctx context.Context, appInstApi *AppInstApi, cloudlet *edgeproto.Cloudlet) *AppInstIDSanitizer
func (*AppInstIDSanitizer) NameSanitize ¶
func (s *AppInstIDSanitizer) NameSanitize(name string) (string, error)
type AppInstInfoApi ¶
type AppInstInfoApi struct {
// contains filtered or unexported fields
}
func NewAppInstInfoApi ¶
func NewAppInstInfoApi(sync *regiondata.Sync, all *AllApis) *AppInstInfoApi
func (*AppInstInfoApi) Delete ¶
func (s *AppInstInfoApi) Delete(ctx context.Context, in *edgeproto.AppInstInfo, rev int64)
func (*AppInstInfoApi) Prune ¶
func (s *AppInstInfoApi) Prune(ctx context.Context, keys map[edgeproto.AppInstKey]struct{})
func (*AppInstInfoApi) Update ¶
func (s *AppInstInfoApi) Update(ctx context.Context, in *edgeproto.AppInstInfo, rev int64)
type AppInstLatencyApi ¶
type AppInstLatencyApi struct {
// contains filtered or unexported fields
}
func NewAppInstLatencyApi ¶
func NewAppInstLatencyApi(sync *regiondata.Sync, all *AllApis) *AppInstLatencyApi
func (*AppInstLatencyApi) RequestAppInstLatency ¶
func (s *AppInstLatencyApi) RequestAppInstLatency(ctx context.Context, in *edgeproto.AppInstLatency) (*edgeproto.Result, error)
type AppInstRefKeyV1 ¶
type AppInstRefKeyV1 struct { AppKey edgeproto.AppKey `json:"app_key"` ClusterKey ClusterInstRefKeyV1 `json:"cluster_inst_key"` }
New AppInstRefKey is the AppInst Name and Org
type AppInstRefsApi ¶
type AppInstRefsApi struct {
// contains filtered or unexported fields
}
func NewAppInstRefsApi ¶
func NewAppInstRefsApi(sync *regiondata.Sync, all *AllApis) *AppInstRefsApi
func (*AppInstRefsApi) ShowAppInstRefs ¶
func (s *AppInstRefsApi) ShowAppInstRefs(in *edgeproto.AppInstRefs, cb edgeproto.AppInstRefsApi_ShowAppInstRefsServer) error
type AutoClusterType ¶
type AutoClusterType int
const ( NoAutoCluster AutoClusterType = iota ChooseAutoCluster ReservableAutoCluster MultiTenantAutoCluster )
type AutoProvInfoApi ¶
type AutoProvInfoApi struct {
// contains filtered or unexported fields
}
func NewAutoProvInfoApi ¶
func NewAutoProvInfoApi(sync *regiondata.Sync, all *AllApis) *AutoProvInfoApi
func (*AutoProvInfoApi) Delete ¶
func (s *AutoProvInfoApi) Delete(ctx context.Context, in *edgeproto.AutoProvInfo, rev int64)
func (*AutoProvInfoApi) Flush ¶
func (s *AutoProvInfoApi) Flush(ctx context.Context, notifyId int64)
func (*AutoProvInfoApi) Prune ¶
func (s *AutoProvInfoApi) Prune(ctx context.Context, keys map[edgeproto.CloudletKey]struct{})
func (*AutoProvInfoApi) Update ¶
func (s *AutoProvInfoApi) Update(ctx context.Context, in *edgeproto.AutoProvInfo, rev int64)
type AutoProvPolicyApi ¶
type AutoProvPolicyApi struct {
// contains filtered or unexported fields
}
func NewAutoProvPolicyApi ¶
func NewAutoProvPolicyApi(sync *regiondata.Sync, all *AllApis) *AutoProvPolicyApi
func (*AutoProvPolicyApi) AddAutoProvPolicyCloudlet ¶
func (s *AutoProvPolicyApi) AddAutoProvPolicyCloudlet(ctx context.Context, in *edgeproto.AutoProvPolicyCloudlet) (*edgeproto.Result, error)
func (*AutoProvPolicyApi) CreateAutoProvPolicy ¶
func (s *AutoProvPolicyApi) CreateAutoProvPolicy(ctx context.Context, in *edgeproto.AutoProvPolicy) (*edgeproto.Result, error)
func (*AutoProvPolicyApi) DeleteAutoProvPolicy ¶
func (s *AutoProvPolicyApi) DeleteAutoProvPolicy(ctx context.Context, in *edgeproto.AutoProvPolicy) (res *edgeproto.Result, reterr error)
func (*AutoProvPolicyApi) RecvAutoProvCounts ¶
func (s *AutoProvPolicyApi) RecvAutoProvCounts(ctx context.Context, msg *edgeproto.AutoProvCounts)
func (*AutoProvPolicyApi) RemoveAutoProvPolicyCloudlet ¶
func (s *AutoProvPolicyApi) RemoveAutoProvPolicyCloudlet(ctx context.Context, in *edgeproto.AutoProvPolicyCloudlet) (*edgeproto.Result, error)
func (*AutoProvPolicyApi) STMFind ¶
func (s *AutoProvPolicyApi) STMFind(stm concurrency.STM, name, dev string, policy *edgeproto.AutoProvPolicy) error
func (*AutoProvPolicyApi) SetInfluxQ ¶
func (s *AutoProvPolicyApi) SetInfluxQ(influxQ *influxq.InfluxQ)
func (*AutoProvPolicyApi) ShowAutoProvPolicy ¶
func (s *AutoProvPolicyApi) ShowAutoProvPolicy(in *edgeproto.AutoProvPolicy, cb edgeproto.AutoProvPolicyApi_ShowAutoProvPolicyServer) error
func (*AutoProvPolicyApi) UpdateAutoProvPolicy ¶
func (s *AutoProvPolicyApi) UpdateAutoProvPolicy(ctx context.Context, in *edgeproto.AutoProvPolicy) (*edgeproto.Result, error)
func (*AutoProvPolicyApi) UsesCloudlet ¶
func (s *AutoProvPolicyApi) UsesCloudlet(key *edgeproto.CloudletKey) []edgeproto.PolicyKey
type AutoScalePolicyApi ¶
type AutoScalePolicyApi struct {
// contains filtered or unexported fields
}
func NewAutoScalePolicyApi ¶
func NewAutoScalePolicyApi(sync *regiondata.Sync, all *AllApis) *AutoScalePolicyApi
func (*AutoScalePolicyApi) CreateAutoScalePolicy ¶
func (s *AutoScalePolicyApi) CreateAutoScalePolicy(ctx context.Context, in *edgeproto.AutoScalePolicy) (*edgeproto.Result, error)
func (*AutoScalePolicyApi) DeleteAutoScalePolicy ¶
func (s *AutoScalePolicyApi) DeleteAutoScalePolicy(ctx context.Context, in *edgeproto.AutoScalePolicy) (res *edgeproto.Result, reterr error)
func (*AutoScalePolicyApi) ShowAutoScalePolicy ¶
func (s *AutoScalePolicyApi) ShowAutoScalePolicy(in *edgeproto.AutoScalePolicy, cb edgeproto.AutoScalePolicyApi_ShowAutoScalePolicyServer) error
func (*AutoScalePolicyApi) UpdateAutoScalePolicy ¶
func (s *AutoScalePolicyApi) UpdateAutoScalePolicy(ctx context.Context, in *edgeproto.AutoScalePolicy) (*edgeproto.Result, error)
type CallContext ¶
type CallContext struct { Undo bool CRMUndo bool Override edgeproto.CRMOverride AutoCluster bool SkipCloudletReadyCheck bool }
func DefCallContext ¶
func DefCallContext() *CallContext
func (*CallContext) Clone ¶
func (c *CallContext) Clone() *CallContext
func (*CallContext) SetOverride ¶
func (c *CallContext) SetOverride(o *edgeproto.CRMOverride)
SetOverride takes the override specified from the user, and removes it from the input object. Because there may be multiple calls to this function, we only modify the override if it's non-default. Override is only meant as a switch to the current operation, not as a persistent state on the object.
func (*CallContext) WithAutoCluster ¶
func (c *CallContext) WithAutoCluster() *CallContext
func (*CallContext) WithCRMUndo ¶
func (c *CallContext) WithCRMUndo() *CallContext
Normally, the CRM change is the last change in the API call, and if it fails, CRM will clean up after itself. Thus the undo function should skip any CRM changes. However, in some cases (like autocluster), the CRM change is not the last change, and we may hit other failures after the CRM change succeeds. In that case, we need to have the undo function apply the CRM changes.
func (*CallContext) WithUndo ¶
func (c *CallContext) WithUndo() *CallContext
type Checkpointer ¶
type Checkpointer struct {
// contains filtered or unexported fields
}
func NewCheckpointer ¶
func NewCheckpointer(events *influxq.InfluxQ, clusterInstApi *ClusterInstApi) *Checkpointer
func (*Checkpointer) GetInterval ¶
func (s *Checkpointer) GetInterval() time.Duration
func (*Checkpointer) Run ¶
func (s *Checkpointer) Run(ctx context.Context)
func (*Checkpointer) Start ¶
func (s *Checkpointer) Start()
func (*Checkpointer) StartSpan ¶
func (s *Checkpointer) StartSpan() opentracing.Span
func (*Checkpointer) Stop ¶
func (s *Checkpointer) Stop()
type CleanupStreamAction ¶
type CleanupStreamAction bool
var ( CleanupStream CleanupStreamAction = true NoCleanupStream CleanupStreamAction = false )
type CloudletApi ¶
type CloudletApi struct {
// contains filtered or unexported fields
}
func NewCloudletApi ¶
func NewCloudletApi(sync *regiondata.Sync, all *AllApis) *CloudletApi
func (*CloudletApi) AddCloudletAllianceOrg ¶
func (s *CloudletApi) AddCloudletAllianceOrg(ctx context.Context, in *edgeproto.CloudletAllianceOrg) (*edgeproto.Result, error)
func (*CloudletApi) AddCloudletResMapping ¶
func (s *CloudletApi) AddCloudletResMapping(ctx context.Context, in *edgeproto.CloudletResMap) (*edgeproto.Result, error)
func (*CloudletApi) ChangeCloudletDNS ¶
func (s *CloudletApi) ChangeCloudletDNS(key *edgeproto.CloudletKey, inCb edgeproto.CloudletApi_ChangeCloudletDNSServer) (reterr error)
func (*CloudletApi) CreateCloudlet ¶
func (s *CloudletApi) CreateCloudlet(in *edgeproto.Cloudlet, cb edgeproto.CloudletApi_CreateCloudletServer) error
func (*CloudletApi) DeleteCloudlet ¶
func (s *CloudletApi) DeleteCloudlet(in *edgeproto.Cloudlet, cb edgeproto.CloudletApi_DeleteCloudletServer) error
func (*CloudletApi) FindFlavorMatch ¶
func (s *CloudletApi) FindFlavorMatch(ctx context.Context, in *edgeproto.FlavorMatch) (*edgeproto.FlavorMatch, error)
func (*CloudletApi) GenerateAccessKey ¶
func (s *CloudletApi) GenerateAccessKey(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.Result, error)
func (*CloudletApi) Get ¶
func (s *CloudletApi) Get(key *edgeproto.CloudletKey, buf *edgeproto.Cloudlet) bool
func (*CloudletApi) GetAccessData ¶
func (s *CloudletApi) GetAccessData(ctx context.Context, req *edgeproto.AccessDataRequest) (*edgeproto.AccessDataReply, error)
func (*CloudletApi) GetCas ¶
func (s *CloudletApi) GetCas(ctx context.Context, req *edgeproto.GetCasRequest) (*edgeproto.GetCasReply, error)
Get CAs for RegionalCloudlet service. To match the Vault API, each request only returns one CA.
func (*CloudletApi) GetCloudletForVMPool ¶
func (s *CloudletApi) GetCloudletForVMPool(vmPoolKey *edgeproto.VMPoolKey) *edgeproto.Cloudlet
func (*CloudletApi) GetCloudletGPUDriverLicenseConfig ¶
func (s *CloudletApi) GetCloudletGPUDriverLicenseConfig(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.Result, error)
func (*CloudletApi) GetCloudletManifest ¶
func (s *CloudletApi) GetCloudletManifest(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.CloudletManifest, error)
func (*CloudletApi) GetCloudletProps ¶
func (s *CloudletApi) GetCloudletProps(ctx context.Context, in *edgeproto.CloudletProps) (*edgeproto.CloudletProps, error)
func (*CloudletApi) GetCloudletResourceInfo ¶
func (s *CloudletApi) GetCloudletResourceInfo(ctx context.Context, stm concurrency.STM, cloudlet *edgeproto.Cloudlet, vmResources []edgeproto.VMResource, infraResMap map[string]edgeproto.InfraResource) (map[string]edgeproto.InfraResource, error)
func (*CloudletApi) GetCloudletResourceQuotaProps ¶
func (s *CloudletApi) GetCloudletResourceQuotaProps(ctx context.Context, in *edgeproto.CloudletResourceQuotaProps) (*edgeproto.CloudletResourceQuotaProps, error)
func (*CloudletApi) GetCloudletResourceUsage ¶
func (s *CloudletApi) GetCloudletResourceUsage(ctx context.Context, usage *edgeproto.CloudletResourceUsage) (*edgeproto.CloudletResourceUsage, error)
func (*CloudletApi) GetOrganizationsOnCloudlet ¶
func (s *CloudletApi) GetOrganizationsOnCloudlet(in *edgeproto.CloudletKey, cb edgeproto.CloudletApi_GetOrganizationsOnCloudletServer) error
func (*CloudletApi) GetResourceUsage ¶
func (s *CloudletApi) GetResourceUsage(ctx context.Context, stm concurrency.STM, cloudlet *edgeproto.Cloudlet, infraResInfo []edgeproto.InfraResource, allVmResources []edgeproto.VMResource, infraUsage bool) ([]edgeproto.InfraResource, error)
Get actual resource info used by the cloudlet
func (*CloudletApi) HasKey ¶
func (s *CloudletApi) HasKey(key *edgeproto.CloudletKey) bool
func (*CloudletApi) InitVaultClient ¶
func (s *CloudletApi) InitVaultClient(ctx context.Context) error
func (*CloudletApi) IssueCert ¶
func (s *CloudletApi) IssueCert(ctx context.Context, req *edgeproto.IssueCertRequest) (*edgeproto.IssueCertReply, error)
Issue certificate to RegionalCloudlet service.
func (*CloudletApi) RemoveCloudletAllianceOrg ¶
func (s *CloudletApi) RemoveCloudletAllianceOrg(ctx context.Context, in *edgeproto.CloudletAllianceOrg) (*edgeproto.Result, error)
func (*CloudletApi) RemoveCloudletResMapping ¶
func (s *CloudletApi) RemoveCloudletResMapping(ctx context.Context, in *edgeproto.CloudletResMap) (*edgeproto.Result, error)
func (*CloudletApi) ReplaceErrorState ¶
func (s *CloudletApi) ReplaceErrorState(ctx context.Context, in *edgeproto.Cloudlet, newState edgeproto.TrackedState)
func (*CloudletApi) RevokeAccessKey ¶
func (s *CloudletApi) RevokeAccessKey(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.Result, error)
func (*CloudletApi) SetState ¶
func (s *CloudletApi) SetState(ctx context.Context, in *edgeproto.Cloudlet, newState edgeproto.TrackedState)
func (*CloudletApi) ShowCloudlet ¶
func (s *CloudletApi) ShowCloudlet(in *edgeproto.Cloudlet, cb edgeproto.CloudletApi_ShowCloudletServer) error
func (*CloudletApi) ShowFlavorsForCloudlet ¶
func (s *CloudletApi) ShowFlavorsForCloudlet(in *edgeproto.CloudletKey, cb edgeproto.CloudletApi_ShowFlavorsForCloudletServer) error
func (*CloudletApi) UpdateAppInstLocations ¶
func (s *CloudletApi) UpdateAppInstLocations(ctx context.Context, in *edgeproto.Cloudlet)
func (*CloudletApi) UpdateCloudlet ¶
func (s *CloudletApi) UpdateCloudlet(in *edgeproto.Cloudlet, inCb edgeproto.CloudletApi_UpdateCloudletServer) (reterr error)
func (*CloudletApi) UpdateCloudletsUsingTrustPolicy ¶
func (s *CloudletApi) UpdateCloudletsUsingTrustPolicy(ctx context.Context, trustPolicy *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_CreateTrustPolicyServer) error
func (*CloudletApi) UpgradeAccessKey ¶
func (s *CloudletApi) UpgradeAccessKey(stream edgeproto.CloudletAccessKeyApi_UpgradeAccessKeyServer) error
func (*CloudletApi) UsesFlavor ¶
func (s *CloudletApi) UsesFlavor(key *edgeproto.FlavorKey) *edgeproto.CloudletKey
func (*CloudletApi) UsesGPUDriver ¶
func (s *CloudletApi) UsesGPUDriver(driverKey *edgeproto.GPUDriverKey) (bool, []string)
func (*CloudletApi) UsesPlatformFeatures ¶
func (s *CloudletApi) UsesPlatformFeatures(pfKey *edgeproto.PlatformFeaturesKey) (bool, []string)
func (*CloudletApi) UsesResTagTable ¶
func (s *CloudletApi) UsesResTagTable(key *edgeproto.ResTagTableKey) *edgeproto.CloudletKey
func (*CloudletApi) UsesTrustPolicy ¶
func (s *CloudletApi) UsesTrustPolicy(key *edgeproto.PolicyKey, stateMatch edgeproto.TrackedState) *edgeproto.CloudletKey
func (*CloudletApi) ValidateCloudletsUsingTrustPolicy ¶
func (s *CloudletApi) ValidateCloudletsUsingTrustPolicy(ctx context.Context, trustPolicy *edgeproto.TrustPolicy) error
func (*CloudletApi) VerifyTrustPoliciesForAppInsts ¶
func (s *CloudletApi) VerifyTrustPoliciesForAppInsts(ctx context.Context, app *edgeproto.App, appInsts map[edgeproto.AppInstKey]struct{}) error
func (*CloudletApi) WaitForTrustPolicyState ¶
func (s *CloudletApi) WaitForTrustPolicyState(ctx context.Context, key *edgeproto.CloudletKey, targetState edgeproto.TrackedState, errorState edgeproto.TrackedState, timeout time.Duration) error
type CloudletCertRefreshTaskable ¶
type CloudletCertRefreshTaskable struct {
CloudletTaskableHelper
}
func NewCloudletCertRefreshTaskable ¶
func NewCloudletCertRefreshTaskable(all *AllApis) *CloudletCertRefreshTaskable
NewCloudletCertRefreshTaskable returns a PeriodicTaskable for refreshing cloudlet certificates
func (*CloudletCertRefreshTaskable) GetInterval ¶
func (s *CloudletCertRefreshTaskable) GetInterval() time.Duration
func (*CloudletCertRefreshTaskable) StartSpan ¶
func (s *CloudletCertRefreshTaskable) StartSpan() opentracing.Span
type CloudletInfoApi ¶
type CloudletInfoApi struct {
// contains filtered or unexported fields
}
func NewCloudletInfoApi ¶
func NewCloudletInfoApi(sync *regiondata.Sync, all *AllApis) *CloudletInfoApi
func (*CloudletInfoApi) ClearCloudletAndAppInstDownAlerts ¶
func (s *CloudletInfoApi) ClearCloudletAndAppInstDownAlerts(ctx context.Context, in *edgeproto.CloudletInfo)
func (*CloudletInfoApi) Del ¶
func (s *CloudletInfoApi) Del(ctx context.Context, key *edgeproto.CloudletKey, wait func(int64))
func (*CloudletInfoApi) Delete ¶
func (s *CloudletInfoApi) Delete(ctx context.Context, in *edgeproto.CloudletInfo, rev int64)
Delete from notify just marks the cloudlet offline
func (*CloudletInfoApi) EvictCloudletInfo ¶
func (s *CloudletInfoApi) EvictCloudletInfo(ctx context.Context, in *edgeproto.CloudletInfo) (*edgeproto.Result, error)
func (*CloudletInfoApi) FireCloudletAndAppInstDownAlerts ¶
func (s *CloudletInfoApi) FireCloudletAndAppInstDownAlerts(ctx context.Context, in *edgeproto.CloudletInfo)
func (*CloudletInfoApi) Flush ¶
func (s *CloudletInfoApi) Flush(ctx context.Context, notifyId int64)
func (*CloudletInfoApi) InjectCloudletInfo ¶
func (s *CloudletInfoApi) InjectCloudletInfo(ctx context.Context, in *edgeproto.CloudletInfo) (*edgeproto.Result, error)
func (*CloudletInfoApi) Prune ¶
func (s *CloudletInfoApi) Prune(ctx context.Context, keys map[edgeproto.CloudletKey]struct{})
func (*CloudletInfoApi) ShowCloudletInfo ¶
func (s *CloudletInfoApi) ShowCloudletInfo(in *edgeproto.CloudletInfo, cb edgeproto.CloudletInfoApi_ShowCloudletInfoServer) error
func (*CloudletInfoApi) Update ¶
func (s *CloudletInfoApi) Update(ctx context.Context, in *edgeproto.CloudletInfo, rev int64)
func (*CloudletInfoApi) UpdateFields ¶
func (s *CloudletInfoApi) UpdateFields(ctx context.Context, in *edgeproto.CloudletInfo, rev int64)
func (*CloudletInfoApi) UpdateRPC ¶
func (s *CloudletInfoApi) UpdateRPC(ctx context.Context, in *edgeproto.CloudletInfo)
type CloudletNodeApi ¶
type CloudletNodeApi struct {
// contains filtered or unexported fields
}
func NewCloudletNodeApi ¶
func NewCloudletNodeApi(sync *regiondata.Sync, all *AllApis) *CloudletNodeApi
func (*CloudletNodeApi) CreateCloudletNode ¶
func (s *CloudletNodeApi) CreateCloudletNode(ctx context.Context, in *edgeproto.CloudletNode) (*edgeproto.Result, error)
func (*CloudletNodeApi) CreateCloudletNodeReq ¶
func (s *CloudletNodeApi) CreateCloudletNodeReq(ctx context.Context, node *edgeproto.CloudletNode) (string, error)
func (*CloudletNodeApi) DeleteCloudletNode ¶
func (s *CloudletNodeApi) DeleteCloudletNode(ctx context.Context, in *edgeproto.CloudletNode) (*edgeproto.Result, error)
func (*CloudletNodeApi) DeleteCloudletNodeReq ¶
func (s *CloudletNodeApi) DeleteCloudletNodeReq(ctx context.Context, key *edgeproto.CloudletNodeKey) error
func (*CloudletNodeApi) ShowCloudletNode ¶
func (s *CloudletNodeApi) ShowCloudletNode(in *edgeproto.CloudletNode, cb edgeproto.CloudletNodeApi_ShowCloudletNodeServer) error
func (*CloudletNodeApi) UpdateCloudletNode ¶
func (s *CloudletNodeApi) UpdateCloudletNode(ctx context.Context, in *edgeproto.CloudletNode) (*edgeproto.Result, error)
type CloudletPoolApi ¶
type CloudletPoolApi struct {
// contains filtered or unexported fields
}
func NewCloudletPoolApi ¶
func NewCloudletPoolApi(sync *regiondata.Sync, all *AllApis) *CloudletPoolApi
func (*CloudletPoolApi) AddCloudletPoolMember ¶
func (s *CloudletPoolApi) AddCloudletPoolMember(ctx context.Context, in *edgeproto.CloudletPoolMember) (*edgeproto.Result, error)
func (*CloudletPoolApi) CreateCloudletPool ¶
func (s *CloudletPoolApi) CreateCloudletPool(ctx context.Context, in *edgeproto.CloudletPool) (*edgeproto.Result, error)
func (*CloudletPoolApi) DeleteCloudletPool ¶
func (s *CloudletPoolApi) DeleteCloudletPool(ctx context.Context, in *edgeproto.CloudletPool) (res *edgeproto.Result, reterr error)
func (*CloudletPoolApi) GetCloudletPoolKeysForCloudletKey ¶
func (s *CloudletPoolApi) GetCloudletPoolKeysForCloudletKey(in *edgeproto.CloudletKey) []edgeproto.CloudletPoolKey
func (*CloudletPoolApi) HasCloudletPool ¶
func (s *CloudletPoolApi) HasCloudletPool(key *edgeproto.CloudletPoolKey) bool
func (*CloudletPoolApi) RemoveCloudletPoolMember ¶
func (s *CloudletPoolApi) RemoveCloudletPoolMember(ctx context.Context, in *edgeproto.CloudletPoolMember) (*edgeproto.Result, error)
func (*CloudletPoolApi) ShowCloudletPool ¶
func (s *CloudletPoolApi) ShowCloudletPool(in *edgeproto.CloudletPool, cb edgeproto.CloudletPoolApi_ShowCloudletPoolServer) error
func (*CloudletPoolApi) UpdateCloudletPool ¶
func (s *CloudletPoolApi) UpdateCloudletPool(ctx context.Context, in *edgeproto.CloudletPool) (*edgeproto.Result, error)
func (*CloudletPoolApi) UsesCloudlet ¶
func (s *CloudletPoolApi) UsesCloudlet(key *edgeproto.CloudletKey) []edgeproto.CloudletPoolKey
type CloudletRefsApi ¶
type CloudletRefsApi struct {
// contains filtered or unexported fields
}
func NewCloudletRefsApi ¶
func NewCloudletRefsApi(sync *regiondata.Sync, all *AllApis) *CloudletRefsApi
func (*CloudletRefsApi) Delete ¶
func (s *CloudletRefsApi) Delete(ctx context.Context, key *edgeproto.CloudletKey, wait func(int64))
func (*CloudletRefsApi) ShowCloudletRefs ¶
func (s *CloudletRefsApi) ShowCloudletRefs(in *edgeproto.CloudletRefs, cb edgeproto.CloudletRefsApi_ShowCloudletRefsServer) error
type CloudletRefsV1 ¶
type CloudletRefsV1 struct { ClusterInsts []ClusterInstRefKeyV1 `json:"cluster_insts"` VmAppInsts []AppInstRefKeyV1 `json:"vm_app_insts"` K8SAppInsts []AppInstRefKeyV1 `json:"k8s_app_insts"` }
type CloudletTaskableHelper ¶
type CloudletTaskableHelper struct {
// contains filtered or unexported fields
}
CloudletTaskableHelper provides common code for any periodic cloudlet task
func (*CloudletTaskableHelper) Run ¶
func (s *CloudletTaskableHelper) Run(ctx context.Context)
type ClusterCheckpoint ¶
type ClusterCheckpoint struct { Timestamp time.Time Org string Keys []*edgeproto.ClusterKey Status []string // either cloudcommon.InstanceUp or cloudcommon.InstanceDown }
func GetClusterCheckpoint ¶
func GetClusterCheckpoint(ctx context.Context, org string, timestamp time.Time) (*ClusterCheckpoint, error)
returns all the checkpointed clusterinsts of the most recent checkpoint with regards to timestamp
type ClusterInstApi ¶
type ClusterInstApi struct {
// contains filtered or unexported fields
}
func NewClusterInstApi ¶
func NewClusterInstApi(sync *regiondata.Sync, all *AllApis) *ClusterInstApi
func (*ClusterInstApi) CreateClusterCheckpoint ¶
This is checkpointing for the usage api, from month to month
func (*ClusterInstApi) CreateClusterInst ¶
func (s *ClusterInstApi) CreateClusterInst(in *edgeproto.ClusterInst, cb edgeproto.ClusterInstApi_CreateClusterInstServer) error
func (*ClusterInstApi) DeleteClusterInst ¶
func (s *ClusterInstApi) DeleteClusterInst(in *edgeproto.ClusterInst, cb edgeproto.ClusterInstApi_DeleteClusterInstServer) error
func (*ClusterInstApi) DeleteFromInfo ¶
func (s *ClusterInstApi) DeleteFromInfo(ctx context.Context, in *edgeproto.ClusterInstInfo)
func (*ClusterInstApi) DeleteIdleReservableClusterInsts ¶
func (s *ClusterInstApi) DeleteIdleReservableClusterInsts(ctx context.Context, in *edgeproto.IdleReservableClusterInsts) (*edgeproto.Result, error)
func (*ClusterInstApi) Get ¶
func (s *ClusterInstApi) Get(key *edgeproto.ClusterKey, buf *edgeproto.ClusterInst) bool
func (*ClusterInstApi) GetRootLBFlavorInfo ¶
func (s *ClusterInstApi) GetRootLBFlavorInfo(ctx context.Context, stm concurrency.STM, cloudlet *edgeproto.Cloudlet, cloudletInfo *edgeproto.CloudletInfo) (*edgeproto.FlavorInfo, error)
func (*ClusterInstApi) HasKey ¶
func (s *ClusterInstApi) HasKey(key *edgeproto.ClusterKey) bool
func (*ClusterInstApi) RecordClusterInstEvent ¶
func (s *ClusterInstApi) RecordClusterInstEvent(ctx context.Context, cluster *edgeproto.ClusterInst, event cloudcommon.InstanceEvent, serverStatus string)
func (*ClusterInstApi) ReplaceErrorState ¶
func (s *ClusterInstApi) ReplaceErrorState(ctx context.Context, in *edgeproto.ClusterInst, newState edgeproto.TrackedState)
func (*ClusterInstApi) ShowClusterInst ¶
func (s *ClusterInstApi) ShowClusterInst(in *edgeproto.ClusterInst, cb edgeproto.ClusterInstApi_ShowClusterInstServer) error
func (*ClusterInstApi) UpdateClusterInst ¶
func (s *ClusterInstApi) UpdateClusterInst(in *edgeproto.ClusterInst, cb edgeproto.ClusterInstApi_UpdateClusterInstServer) error
func (*ClusterInstApi) UpdateFromInfo ¶
func (s *ClusterInstApi) UpdateFromInfo(ctx context.Context, in *edgeproto.ClusterInstInfo)
func (*ClusterInstApi) UsesAutoScalePolicy ¶
func (s *ClusterInstApi) UsesAutoScalePolicy(key *edgeproto.PolicyKey) *edgeproto.ClusterKey
func (*ClusterInstApi) UsesFlavor ¶
func (s *ClusterInstApi) UsesFlavor(key *edgeproto.FlavorKey) *edgeproto.ClusterKey
func (*ClusterInstApi) UsesNetwork ¶
func (s *ClusterInstApi) UsesNetwork(networkKey *edgeproto.NetworkKey) *edgeproto.ClusterKey
type ClusterInstInfoApi ¶
type ClusterInstInfoApi struct {
// contains filtered or unexported fields
}
func NewClusterInstInfoApi ¶
func NewClusterInstInfoApi(sync *regiondata.Sync, all *AllApis) *ClusterInstInfoApi
func (*ClusterInstInfoApi) Delete ¶
func (s *ClusterInstInfoApi) Delete(ctx context.Context, in *edgeproto.ClusterInstInfo, rev int64)
func (*ClusterInstInfoApi) Flush ¶
func (s *ClusterInstInfoApi) Flush(ctx context.Context, notifyId int64)
func (*ClusterInstInfoApi) Prune ¶
func (s *ClusterInstInfoApi) Prune(ctx context.Context, keys map[edgeproto.ClusterKey]struct{})
func (*ClusterInstInfoApi) Update ¶
func (s *ClusterInstInfoApi) Update(ctx context.Context, in *edgeproto.ClusterInstInfo, rev int64)
type ClusterInstRefKeyV1 ¶
type ClusterInstRefKeyV1 struct { ClusterKey edgeproto.ClusterKeyV1 `json:"cluster_key"` Organization string `json:"organization,omitempty"` }
New ClusterInstRefKey is just the ClusterKey
type ClusterRefsApi ¶
type ClusterRefsApi struct {
// contains filtered or unexported fields
}
func NewClusterRefsApi ¶
func NewClusterRefsApi(sync *regiondata.Sync, all *AllApis) *ClusterRefsApi
func (*ClusterRefsApi) ShowClusterRefs ¶
func (s *ClusterRefsApi) ShowClusterRefs(in *edgeproto.ClusterRefs, cb edgeproto.ClusterRefsApi_ShowClusterRefsServer) error
type ControllerApi ¶
type ControllerApi struct {
// contains filtered or unexported fields
}
func NewControllerApi ¶
func NewControllerApi(sync *regiondata.Sync, all *AllApis) *ControllerApi
func (*ControllerApi) RunJobs ¶
func (s *ControllerApi) RunJobs(ctx context.Context, run func(ctx context.Context, arg interface{}, addr string) error, arg interface{}) error
RunJobs spawns a thread per controller to run the passed in function. RunJobs blocks until all threads are done.
func (*ControllerApi) ShowController ¶
func (s *ControllerApi) ShowController(in *edgeproto.Controller, cb edgeproto.ControllerApi_ShowControllerServer) error
type ControllerMetricsReceiver ¶
type ControllerMetricsReceiver struct {
// contains filtered or unexported fields
}
func NewControllerMetricsReceiver ¶
func NewControllerMetricsReceiver(metricsInflux *influxq.InfluxQ, edgeEventsInflux *influxq.InfluxQ) *ControllerMetricsReceiver
func (*ControllerMetricsReceiver) RecvMetric ¶
func (c *ControllerMetricsReceiver) RecvMetric(ctx context.Context, metric *edgeproto.Metric)
Send metric to correct influxdb
type DebugApi ¶
type DebugApi struct{}
func (*DebugApi) DisableDebugLevels ¶
func (s *DebugApi) DisableDebugLevels(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_DisableDebugLevelsServer) error
func (*DebugApi) EnableDebugLevels ¶
func (s *DebugApi) EnableDebugLevels(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_EnableDebugLevelsServer) error
func (*DebugApi) RunDebug ¶
func (s *DebugApi) RunDebug(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_RunDebugServer) error
func (*DebugApi) ShowDebugLevels ¶
func (s *DebugApi) ShowDebugLevels(req *edgeproto.DebugRequest, cb edgeproto.DebugApi_ShowDebugLevelsServer) error
type DeviceApi ¶
type DeviceApi struct {
// contains filtered or unexported fields
}
func NewDeviceApi ¶
func NewDeviceApi(sync *regiondata.Sync, all *AllApis) *DeviceApi
func (*DeviceApi) CreateDevice ¶
func (*DeviceApi) EvictDevice ¶
func (s *DeviceApi) EvictDevice(ctx context.Context, in *edgeproto.Device) (*edgeproto.Result, error)
This api deletes the device from the controller cache
func (*DeviceApi) InjectDevice ¶
func (*DeviceApi) ShowDevice ¶
func (*DeviceApi) ShowDeviceReport ¶
func (s *DeviceApi) ShowDeviceReport(in *edgeproto.DeviceReport, cb edgeproto.DeviceApi_ShowDeviceReportServer) error
Show devices that showed up in this timestamp
type DummyInfoResponder ¶
type DummyInfoResponder struct { CloudletCache *edgeproto.CloudletCache AppInstCache *edgeproto.AppInstCache AppInstInfoCache edgeproto.AppInstInfoCache ClusterInstCache *edgeproto.ClusterInstCache ClusterInstInfoCache edgeproto.ClusterInstInfoCache RecvAppInstInfo notify.RecvAppInstInfoHandler RecvClusterInstInfo notify.RecvClusterInstInfoHandler VMPoolCache *edgeproto.VMPoolCache VMPoolInfoCache edgeproto.VMPoolInfoCache RecvVMPoolInfo notify.RecvVMPoolInfoHandler // contains filtered or unexported fields }
func DefaultDummyInfoResponder ¶
func DefaultDummyInfoResponder(apis *AllApis) *DummyInfoResponder
func (*DummyInfoResponder) InitDummyInfoResponder ¶
func (d *DummyInfoResponder) InitDummyInfoResponder()
func (*DummyInfoResponder) SetPause ¶
func (d *DummyInfoResponder) SetPause(enable bool)
Pauses responder until unpaused. Warning: don't double-pause or double-unpause.
func (*DummyInfoResponder) SetSimulateAppCreateFailure ¶
func (d *DummyInfoResponder) SetSimulateAppCreateFailure(state bool)
func (*DummyInfoResponder) SetSimulateAppDeleteFailure ¶
func (d *DummyInfoResponder) SetSimulateAppDeleteFailure(state bool)
func (*DummyInfoResponder) SetSimulateClusterCreateFailure ¶
func (d *DummyInfoResponder) SetSimulateClusterCreateFailure(state bool)
func (*DummyInfoResponder) SetSimulateClusterDeleteFailure ¶
func (d *DummyInfoResponder) SetSimulateClusterDeleteFailure(state bool)
func (*DummyInfoResponder) SetSimulateVMPoolUpdateFailure ¶
func (d *DummyInfoResponder) SetSimulateVMPoolUpdateFailure(state bool)
type DummyStreamout ¶
type DummyStreamout struct { grpc.ServerStream // contains filtered or unexported fields }
func (*DummyStreamout) Context ¶
func (d *DummyStreamout) Context() context.Context
type ExecApi ¶
type ExecApi struct {
// contains filtered or unexported fields
}
func NewExecApi ¶
func (*ExecApi) AccessCloudlet ¶
func (s *ExecApi) AccessCloudlet(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
func (*ExecApi) RecvExecRequest ¶
func (s *ExecApi) RecvExecRequest(ctx context.Context, msg *edgeproto.ExecRequest)
Receive message from notify framework
func (*ExecApi) RunCommand ¶
func (s *ExecApi) RunCommand(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
func (*ExecApi) RunConsole ¶
func (s *ExecApi) RunConsole(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
func (*ExecApi) SendLocalRequest ¶
func (s *ExecApi) SendLocalRequest(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
sendLocalRequest sends the request over the notify framework to all CRM clients. We then wait for a CRM client with the AppInst to reply with an answer to the offer.
func (*ExecApi) ShowLogs ¶
func (s *ExecApi) ShowLogs(ctx context.Context, req *edgeproto.ExecRequest) (*edgeproto.ExecRequest, error)
type FlavorApi ¶
type FlavorApi struct {
// contains filtered or unexported fields
}
func NewFlavorApi ¶
func NewFlavorApi(sync *regiondata.Sync, all *AllApis) *FlavorApi
func (*FlavorApi) AddFlavorRes ¶
func (*FlavorApi) CreateFlavor ¶
func (*FlavorApi) DeleteFlavor ¶
func (*FlavorApi) RemoveFlavorRes ¶
func (*FlavorApi) ShowFlavor ¶
type FlowRateLimitSettingsApi ¶
type FlowRateLimitSettingsApi struct {
// contains filtered or unexported fields
}
func NewFlowRateLimitSettingsApi ¶
func NewFlowRateLimitSettingsApi(sync *regiondata.Sync, all *AllApis) *FlowRateLimitSettingsApi
func (*FlowRateLimitSettingsApi) CreateFlowRateLimitSettings ¶
func (r *FlowRateLimitSettingsApi) CreateFlowRateLimitSettings(ctx context.Context, in *edgeproto.FlowRateLimitSettings) (*edgeproto.Result, error)
Create FlowRateLimitSettings for the specified RateLimitSettings. If no RateLimitSettings exists, create a new one
func (*FlowRateLimitSettingsApi) DeleteFlowRateLimitSettings ¶
func (r *FlowRateLimitSettingsApi) DeleteFlowRateLimitSettings(ctx context.Context, in *edgeproto.FlowRateLimitSettings) (*edgeproto.Result, error)
Delete FlowRateLimitSettings for the specified RateLimitSettings. If no FlowSettings and MaxReqsSettings left, remove the RateLimitSettings
func (*FlowRateLimitSettingsApi) ShowFlowRateLimitSettings ¶
func (r *FlowRateLimitSettingsApi) ShowFlowRateLimitSettings(in *edgeproto.FlowRateLimitSettings, cb edgeproto.RateLimitSettingsApi_ShowFlowRateLimitSettingsServer) error
Show FlowRateLimit settings for an API endpoint type
func (*FlowRateLimitSettingsApi) ShowRateLimitSettings ¶
func (r *FlowRateLimitSettingsApi) ShowRateLimitSettings(in *edgeproto.RateLimitSettings, cb edgeproto.RateLimitSettingsApi_ShowRateLimitSettingsServer) error
Show RateLimit settings for an API endpoint type
func (*FlowRateLimitSettingsApi) UpdateFlowRateLimitSettings ¶
func (r *FlowRateLimitSettingsApi) UpdateFlowRateLimitSettings(ctx context.Context, in *edgeproto.FlowRateLimitSettings) (*edgeproto.Result, error)
Update FlowRateLimitSettings for the specified RateLimitSettings
type GPUDriverApi ¶
type GPUDriverApi struct {
// contains filtered or unexported fields
}
func NewGPUDriverApi ¶
func NewGPUDriverApi(sync *regiondata.Sync, all *AllApis) *GPUDriverApi
func (*GPUDriverApi) AddGPUDriverBuild ¶
func (s *GPUDriverApi) AddGPUDriverBuild(in *edgeproto.GPUDriverBuildMember, cb edgeproto.GPUDriverApi_AddGPUDriverBuildServer) (reterr error)
func (*GPUDriverApi) CreateGPUDriver ¶
func (s *GPUDriverApi) CreateGPUDriver(in *edgeproto.GPUDriver, cb edgeproto.GPUDriverApi_CreateGPUDriverServer) (reterr error)
func (*GPUDriverApi) DeleteGPUDriver ¶
func (s *GPUDriverApi) DeleteGPUDriver(in *edgeproto.GPUDriver, cb edgeproto.GPUDriverApi_DeleteGPUDriverServer) error
func (*GPUDriverApi) GetGPUDriverBuildURL ¶
func (s *GPUDriverApi) GetGPUDriverBuildURL(ctx context.Context, in *edgeproto.GPUDriverBuildMember) (*edgeproto.GPUDriverBuildURL, error)
func (*GPUDriverApi) GetGPUDriverLicenseConfig ¶
func (s *GPUDriverApi) GetGPUDriverLicenseConfig(ctx context.Context, key *edgeproto.GPUDriverKey) (*edgeproto.Result, error)
func (*GPUDriverApi) RemoveGPUDriverBuild ¶
func (s *GPUDriverApi) RemoveGPUDriverBuild(in *edgeproto.GPUDriverBuildMember, cb edgeproto.GPUDriverApi_RemoveGPUDriverBuildServer) error
func (*GPUDriverApi) ShowGPUDriver ¶
func (s *GPUDriverApi) ShowGPUDriver(in *edgeproto.GPUDriver, cb edgeproto.GPUDriverApi_ShowGPUDriverServer) error
func (*GPUDriverApi) UpdateGPUDriver ¶
func (s *GPUDriverApi) UpdateGPUDriver(in *edgeproto.GPUDriver, cb edgeproto.GPUDriverApi_UpdateGPUDriverServer) (reterr error)
type GenerateResourceAlerts ¶
type GenerateResourceAlerts int
type MaxReqsRateLimitSettingsApi ¶
type MaxReqsRateLimitSettingsApi struct {
// contains filtered or unexported fields
}
func NewMaxReqsRateLimitSettingsApi ¶
func NewMaxReqsRateLimitSettingsApi(sync *regiondata.Sync, all *AllApis) *MaxReqsRateLimitSettingsApi
Init store and cache for MaxReqsRateLimitSettings
func (*MaxReqsRateLimitSettingsApi) CreateMaxReqsRateLimitSettings ¶
func (r *MaxReqsRateLimitSettingsApi) CreateMaxReqsRateLimitSettings(ctx context.Context, in *edgeproto.MaxReqsRateLimitSettings) (*edgeproto.Result, error)
Create MaxReqsRateLimitSettings for the specified RateLimitSettings. If no RateLimitSettings exists, create a new one
func (*MaxReqsRateLimitSettingsApi) DeleteMaxReqsRateLimitSettings ¶
func (r *MaxReqsRateLimitSettingsApi) DeleteMaxReqsRateLimitSettings(ctx context.Context, in *edgeproto.MaxReqsRateLimitSettings) (*edgeproto.Result, error)
Delete MaxReqsRateLimitSettings for the specified RateLimitSettings. If no FlowSettings and MaxReqsSettings left, remove the RateLimitSettings
func (*MaxReqsRateLimitSettingsApi) ShowMaxReqsRateLimitSettings ¶
func (r *MaxReqsRateLimitSettingsApi) ShowMaxReqsRateLimitSettings(in *edgeproto.MaxReqsRateLimitSettings, cb edgeproto.RateLimitSettingsApi_ShowMaxReqsRateLimitSettingsServer) error
Show MaxReqsRateLimit settings for an API endpoint type
func (*MaxReqsRateLimitSettingsApi) UpdateMaxReqsRateLimitSettings ¶
func (r *MaxReqsRateLimitSettingsApi) UpdateMaxReqsRateLimitSettings(ctx context.Context, in *edgeproto.MaxReqsRateLimitSettings) (*edgeproto.Result, error)
Update MaxReqsRateLimitSettings for the specified RateLimitSettings
type NameSanitizer ¶
NameSanitizer is broken out as an interface for unit tests
type NetworkApi ¶
type NetworkApi struct {
// contains filtered or unexported fields
}
func NewNetworkApi ¶
func NewNetworkApi(sync *regiondata.Sync, all *AllApis) *NetworkApi
func (*NetworkApi) CreateNetwork ¶
func (s *NetworkApi) CreateNetwork(in *edgeproto.Network, cb edgeproto.NetworkApi_CreateNetworkServer) error
func (*NetworkApi) DeleteNetwork ¶
func (s *NetworkApi) DeleteNetwork(in *edgeproto.Network, cb edgeproto.NetworkApi_DeleteNetworkServer) (reterr error)
func (*NetworkApi) ShowNetwork ¶
func (s *NetworkApi) ShowNetwork(in *edgeproto.Network, cb edgeproto.NetworkApi_ShowNetworkServer) error
func (*NetworkApi) UpdateNetwork ¶
func (s *NetworkApi) UpdateNetwork(in *edgeproto.Network, cb edgeproto.NetworkApi_UpdateNetworkServer) error
func (*NetworkApi) UsesCloudlet ¶
func (s *NetworkApi) UsesCloudlet(in *edgeproto.CloudletKey) *edgeproto.NetworkKey
type OperatorCodeApi ¶
type OperatorCodeApi struct {
// contains filtered or unexported fields
}
func NewOperatorCodeApi ¶
func NewOperatorCodeApi(sync *regiondata.Sync, all *AllApis) *OperatorCodeApi
func (*OperatorCodeApi) CreateOperatorCode ¶
func (s *OperatorCodeApi) CreateOperatorCode(ctx context.Context, in *edgeproto.OperatorCode) (*edgeproto.Result, error)
func (*OperatorCodeApi) DeleteOperatorCode ¶
func (s *OperatorCodeApi) DeleteOperatorCode(ctx context.Context, in *edgeproto.OperatorCode) (*edgeproto.Result, error)
func (*OperatorCodeApi) ShowOperatorCode ¶
func (s *OperatorCodeApi) ShowOperatorCode(in *edgeproto.OperatorCode, cb edgeproto.OperatorCodeApi_ShowOperatorCodeServer) error
type OrganizationApi ¶
type OrganizationApi struct {
// contains filtered or unexported fields
}
func NewOrganizationApi ¶
func NewOrganizationApi(sync *regiondata.Sync, all *AllApis) *OrganizationApi
func (*OrganizationApi) OrganizationInUse ¶
func (s *OrganizationApi) OrganizationInUse(ctx context.Context, in *edgeproto.Organization) (*edgeproto.Result, error)
type PeriodicData ¶
type PeriodicReservableClusterInstCleanup ¶
type PeriodicReservableClusterInstCleanup struct {
// contains filtered or unexported fields
}
func (*PeriodicReservableClusterInstCleanup) GetInterval ¶
func (s *PeriodicReservableClusterInstCleanup) GetInterval() time.Duration
func (*PeriodicReservableClusterInstCleanup) Run ¶
func (s *PeriodicReservableClusterInstCleanup) Run(ctx context.Context)
func (*PeriodicReservableClusterInstCleanup) StartSpan ¶
func (s *PeriodicReservableClusterInstCleanup) StartSpan() opentracing.Span
type PlatformFeaturesApi ¶
type PlatformFeaturesApi struct {
// contains filtered or unexported fields
}
func NewPlatformFeaturesApi ¶
func NewPlatformFeaturesApi(sync *regiondata.Sync, all *AllApis) *PlatformFeaturesApi
func (*PlatformFeaturesApi) Delete ¶
func (s *PlatformFeaturesApi) Delete(ctx context.Context, in *edgeproto.PlatformFeatures, rev int64)
func (*PlatformFeaturesApi) DeletePlatformFeatures ¶
func (s *PlatformFeaturesApi) DeletePlatformFeatures(ctx context.Context, in *edgeproto.PlatformFeatures) (res *edgeproto.Result, reterr error)
DeletePlatformFeatures for platforms that are no longer supported. PlatformFeatures are populated by CCRMs, but we do not clean them up if a CCRM goes offline because there may still be Cloudlets referencing them. If the CCRM is not just temporarily offline, but has been removed from the system, then this API allows the admin the manually remove features for platforms that are no longer supported.
func (*PlatformFeaturesApi) FeaturesByPlatform ¶
func (s *PlatformFeaturesApi) FeaturesByPlatform() map[string]edgeproto.PlatformFeatures
func (*PlatformFeaturesApi) Flush ¶
func (s *PlatformFeaturesApi) Flush(ctx context.Context, notifyId int64)
func (*PlatformFeaturesApi) GetCloudletFeatures ¶
func (s *PlatformFeaturesApi) GetCloudletFeatures(ctx context.Context, platformType string) (*edgeproto.PlatformFeatures, error)
func (*PlatformFeaturesApi) Prune ¶
func (s *PlatformFeaturesApi) Prune(ctx context.Context, keys map[edgeproto.PlatformFeaturesKey]struct{})
func (*PlatformFeaturesApi) ShowPlatformFeatures ¶
func (s *PlatformFeaturesApi) ShowPlatformFeatures(in *edgeproto.PlatformFeatures, cb edgeproto.PlatformFeaturesApi_ShowPlatformFeaturesServer) error
func (*PlatformFeaturesApi) Update ¶
func (s *PlatformFeaturesApi) Update(ctx context.Context, in *edgeproto.PlatformFeatures, rev int64)
Update platformFeatures, sent by CCRM to Controller
type RateLimitSettingsApi ¶
type RateLimitSettingsApi struct { *FlowRateLimitSettingsApi *MaxReqsRateLimitSettingsApi }
type ResTagTableApi ¶
type ResTagTableApi struct {
// contains filtered or unexported fields
}
func NewResTagTableApi ¶
func NewResTagTableApi(sync *regiondata.Sync, all *AllApis) *ResTagTableApi
func (*ResTagTableApi) AddGpuResourceHintIfNeeded ¶
func (s *ResTagTableApi) AddGpuResourceHintIfNeeded(ctx context.Context, stm concurrency.STM, spec *vmspec.VMCreationSpec, cloudlet edgeproto.Cloudlet) string
func (*ResTagTableApi) AddResTag ¶
func (s *ResTagTableApi) AddResTag(ctx context.Context, in *edgeproto.ResTagTable) (*edgeproto.Result, error)
func (*ResTagTableApi) CreateResTagTable ¶
func (s *ResTagTableApi) CreateResTagTable(ctx context.Context, in *edgeproto.ResTagTable) (*edgeproto.Result, error)
func (*ResTagTableApi) DeleteResTagTable ¶
func (s *ResTagTableApi) DeleteResTagTable(ctx context.Context, in *edgeproto.ResTagTable) (res *edgeproto.Result, reterr error)
func (*ResTagTableApi) GetCloudletResourceMap ¶
func (s *ResTagTableApi) GetCloudletResourceMap(ctx context.Context, stm concurrency.STM, key *edgeproto.ResTagTableKey) (*edgeproto.ResTagTable, error)
Routines supporting the mapping used in GetVMSpec
func (*ResTagTableApi) GetResTablesForCloudlet ¶
func (s *ResTagTableApi) GetResTablesForCloudlet(ctx context.Context, stm concurrency.STM, cl *edgeproto.Cloudlet) (tables map[string]*edgeproto.ResTagTable, err error)
func (*ResTagTableApi) GetResTagTable ¶
func (s *ResTagTableApi) GetResTagTable(ctx context.Context, in *edgeproto.ResTagTableKey) (*edgeproto.ResTagTable, error)
func (*ResTagTableApi) GetVMSpec ¶
func (s *ResTagTableApi) GetVMSpec(ctx context.Context, stm concurrency.STM, nodeflavor edgeproto.Flavor, cloudletFlavorName string, cl edgeproto.Cloudlet, cli edgeproto.CloudletInfo) (*vmspec.VMCreationSpec, error)
GetVMSpec returns the VMCreationAttributes including flavor name and the size of the external volume which is required, if any
func (*ResTagTableApi) RemoveResTag ¶
func (s *ResTagTableApi) RemoveResTag(ctx context.Context, in *edgeproto.ResTagTable) (*edgeproto.Result, error)
func (*ResTagTableApi) ShowResTagTable ¶
func (s *ResTagTableApi) ShowResTagTable(in *edgeproto.ResTagTable, cb edgeproto.ResTagTableApi_ShowResTagTableServer) error
func (*ResTagTableApi) UpdateResTagTable ¶
func (s *ResTagTableApi) UpdateResTagTable(ctx context.Context, in *edgeproto.ResTagTable) (*edgeproto.Result, error)
Update misc data, so far the availability zone for any of the optional resources needed.
func (*ResTagTableApi) UsesGpu ¶
func (s *ResTagTableApi) UsesGpu(ctx context.Context, stm concurrency.STM, flavor edgeproto.FlavorInfo, cl edgeproto.Cloudlet) bool
func (*ResTagTableApi) ValidateOptResMapValues ¶
func (s *ResTagTableApi) ValidateOptResMapValues(resmap map[string]string) (bool, error)
func (*ResTagTableApi) ValidateResName ¶
type RunTimeStats ¶
type RunTimeStats struct {
// contains filtered or unexported fields
}
type SettingsApi ¶
type SettingsApi struct {
// contains filtered or unexported fields
}
func NewSettingsApi ¶
func NewSettingsApi(sync *regiondata.Sync, all *AllApis) *SettingsApi
func (*SettingsApi) Get ¶
func (s *SettingsApi) Get() *edgeproto.Settings
func (*SettingsApi) ResetSettings ¶
func (*SettingsApi) ShowSettings ¶
func (*SettingsApi) UpdateSettings ¶
type StreamObjApi ¶
type StreamObjApi struct {
// contains filtered or unexported fields
}
func NewStreamObjApi ¶
func NewStreamObjApi(sync *regiondata.Sync, all *AllApis) *StreamObjApi
func (*StreamObjApi) StreamAppInst ¶
func (s *StreamObjApi) StreamAppInst(key *edgeproto.AppInstKey, cb edgeproto.StreamObjApi_StreamAppInstServer) error
func (*StreamObjApi) StreamCloudlet ¶
func (s *StreamObjApi) StreamCloudlet(key *edgeproto.CloudletKey, cb edgeproto.StreamObjApi_StreamCloudletServer) error
func (*StreamObjApi) StreamClusterInst ¶
func (s *StreamObjApi) StreamClusterInst(key *edgeproto.ClusterKey, cb edgeproto.StreamObjApi_StreamClusterInstServer) error
func (*StreamObjApi) StreamGPUDriver ¶
func (s *StreamObjApi) StreamGPUDriver(key *edgeproto.GPUDriverKey, cb edgeproto.StreamObjApi_StreamGPUDriverServer) error
func (*StreamObjApi) StreamMsgs ¶
func (s *StreamObjApi) StreamMsgs(ctx context.Context, streamKey string, cb edgeproto.StreamObjApi_StreamAppInstServer) error
func (*StreamObjApi) UpdateStatus ¶
func (s *StreamObjApi) UpdateStatus(ctx context.Context, obj interface{}, state *edgeproto.TrackedState, cloudletState *dme.CloudletState, streamKey string)
Publish info object received from CRM to redis so that controller can act on status messages & info state accordingly
type StreamOp ¶
type StreamOp func(op *StreamOptions)
func WithNoResetStream ¶
func WithNoResetStream() StreamOp
type StreamOptions ¶
type StreamOptions struct {
NoResetStream bool
}
type StreamoutCb ¶
type StreamoutCb struct { grpc.ServerStream // contains filtered or unexported fields }
func (*StreamoutCb) Context ¶
func (s *StreamoutCb) Context() context.Context
type SyncLeaseData ¶
type SyncLeaseData struct {
// contains filtered or unexported fields
}
This synchronizes lease data with the persistent storage (etcd). Data associated with the lease is meant to be deleted after the lease expires, if this controller goes away. However, it's also possible due to network/cpu congestion, that the lease keepalives fail even though both Controller and Etcd are running. If that happens, etcd will flush the lease data, and this Controller needs to restore it once a new lease can be established.
func NewSyncLeaseData ¶
func NewSyncLeaseData(sy *regiondata.Sync, allApis *AllApis) *SyncLeaseData
func (*SyncLeaseData) ControllerAliveLease ¶
func (s *SyncLeaseData) ControllerAliveLease() int64
func (*SyncLeaseData) LeaseID ¶
func (s *SyncLeaseData) LeaseID() int64
func (*SyncLeaseData) Start ¶
func (s *SyncLeaseData) Start(ctx context.Context)
func (*SyncLeaseData) Stop ¶
func (s *SyncLeaseData) Stop()
type TrustPolicyApi ¶
type TrustPolicyApi struct {
// contains filtered or unexported fields
}
func NewTrustPolicyApi ¶
func NewTrustPolicyApi(sync *regiondata.Sync, all *AllApis) *TrustPolicyApi
func (*TrustPolicyApi) CreateTrustPolicy ¶
func (s *TrustPolicyApi) CreateTrustPolicy(in *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_CreateTrustPolicyServer) error
func (*TrustPolicyApi) DeleteTrustPolicy ¶
func (s *TrustPolicyApi) DeleteTrustPolicy(in *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_DeleteTrustPolicyServer) (reterr error)
func (*TrustPolicyApi) GetTrustPolicies ¶
func (s *TrustPolicyApi) GetTrustPolicies(policies map[edgeproto.PolicyKey]*edgeproto.TrustPolicy)
func (*TrustPolicyApi) ShowTrustPolicy ¶
func (s *TrustPolicyApi) ShowTrustPolicy(in *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_ShowTrustPolicyServer) error
func (*TrustPolicyApi) UpdateTrustPolicy ¶
func (s *TrustPolicyApi) UpdateTrustPolicy(in *edgeproto.TrustPolicy, cb edgeproto.TrustPolicyApi_UpdateTrustPolicyServer) error
type TrustPolicyExceptionApi ¶
type TrustPolicyExceptionApi struct {
// contains filtered or unexported fields
}
func NewTrustPolicyExceptionApi ¶
func NewTrustPolicyExceptionApi(sync *regiondata.Sync, all *AllApis) *TrustPolicyExceptionApi
func (*TrustPolicyExceptionApi) CreateTrustPolicyException ¶
func (s *TrustPolicyExceptionApi) CreateTrustPolicyException(ctx context.Context, in *edgeproto.TrustPolicyException) (*edgeproto.Result, error)
func (*TrustPolicyExceptionApi) DeleteTrustPolicyException ¶
func (s *TrustPolicyExceptionApi) DeleteTrustPolicyException(ctx context.Context, in *edgeproto.TrustPolicyException) (*edgeproto.Result, error)
func (*TrustPolicyExceptionApi) GetTrustPolicyExceptionForAppKey ¶
func (s *TrustPolicyExceptionApi) GetTrustPolicyExceptionForAppKey(appKey *edgeproto.AppKey) *edgeproto.TrustPolicyException
func (*TrustPolicyExceptionApi) GetTrustPolicyExceptionForCloudletPoolKey ¶
func (s *TrustPolicyExceptionApi) GetTrustPolicyExceptionForCloudletPoolKey(cKey *edgeproto.CloudletPoolKey) *edgeproto.TrustPolicyException
func (*TrustPolicyExceptionApi) GetTrustPolicyExceptionRules ¶
func (s *TrustPolicyExceptionApi) GetTrustPolicyExceptionRules(ckey *edgeproto.CloudletPoolKey, appKey *edgeproto.AppKey) []*edgeproto.SecurityRule
func (*TrustPolicyExceptionApi) ShowTrustPolicyException ¶
func (s *TrustPolicyExceptionApi) ShowTrustPolicyException(in *edgeproto.TrustPolicyException, cb edgeproto.TrustPolicyExceptionApi_ShowTrustPolicyExceptionServer) error
func (*TrustPolicyExceptionApi) TrustPolicyExceptionForAppKeyExists ¶
func (s *TrustPolicyExceptionApi) TrustPolicyExceptionForAppKeyExists(appKey *edgeproto.AppKey) *edgeproto.TrustPolicyExceptionKey
func (*TrustPolicyExceptionApi) TrustPolicyExceptionForCloudletPoolKeyExists ¶
func (s *TrustPolicyExceptionApi) TrustPolicyExceptionForCloudletPoolKeyExists(cKey *edgeproto.CloudletPoolKey) *edgeproto.TrustPolicyExceptionKey
func (*TrustPolicyExceptionApi) UpdateTrustPolicyException ¶
func (s *TrustPolicyExceptionApi) UpdateTrustPolicyException(ctx context.Context, in *edgeproto.TrustPolicyException) (res *edgeproto.Result, reterr error)
type UpgradeSupport ¶
type UpgradeSupport struct {
// contains filtered or unexported fields
}
type VMPoolApi ¶
type VMPoolApi struct {
// contains filtered or unexported fields
}
func NewVMPoolApi ¶
func NewVMPoolApi(sync *regiondata.Sync, all *AllApis) *VMPoolApi
func (*VMPoolApi) AddVMPoolMember ¶
func (*VMPoolApi) CreateVMPool ¶
func (*VMPoolApi) DeleteVMPool ¶
func (*VMPoolApi) RemoveVMPoolMember ¶
func (*VMPoolApi) ShowVMPool ¶
func (*VMPoolApi) UpdateFromInfo ¶
func (s *VMPoolApi) UpdateFromInfo(ctx context.Context, in *edgeproto.VMPoolInfo)
type VMPoolInfoApi ¶
type VMPoolInfoApi struct {
// contains filtered or unexported fields
}
func NewVMPoolInfoApi ¶
func NewVMPoolInfoApi(sync *regiondata.Sync, all *AllApis) *VMPoolInfoApi
func (*VMPoolInfoApi) Delete ¶
func (s *VMPoolInfoApi) Delete(ctx context.Context, in *edgeproto.VMPoolInfo, rev int64)
func (*VMPoolInfoApi) Prune ¶
func (s *VMPoolInfoApi) Prune(ctx context.Context, keys map[edgeproto.VMPoolKey]struct{})
func (*VMPoolInfoApi) Update ¶
func (s *VMPoolInfoApi) Update(ctx context.Context, in *edgeproto.VMPoolInfo, rev int64)
type VaultRoles ¶
type VaultRoles struct { DmeRoleID string `json:"dmeroleid"` DmeSecretID string `json:"dmesecretid"` CRMRoleID string `json:"crmroleid"` CRMSecretID string `json:"crmsecretid"` CtrlRoleID string `json:"controllerroleid"` CtrlSecretID string `json:"controllersecretid"` }
Vault roles for all services
type VersionUpgrade ¶
type VersionUpgrade struct {
// contains filtered or unexported fields
}
type VersionUpgradeFunc ¶
type VersionUpgradeFunc func(context.Context, objstore.KVStore, *AllApis, *UpgradeSupport, int32) error
Prototype for the upgrade function - takes an objectstore and stm to ensure automicity of each upgrade function
Source Files ¶
- alert_api.go
- alertpolicy_api.go
- app_api.go
- app_checkpoints.go
- appinst_api.go
- appinstclient_api.go
- appinstinfo_api.go
- appinstlatency_api.go
- appinstrefs_api.go
- autoprovinfo_api.go
- autoprovpolicy_api.go
- autoscalepolicy_api.go
- callcontext.go
- ccrm_periodic.go
- checkpoints.go
- cloudlet_api.go
- cloudletaccess_api.go
- cloudletinfo_api.go
- cloudletnode_api.go
- cloudletpool_api.go
- cloudletrefs_api.go
- cluster_checkpoints.go
- clusterinst_api.go
- clusterinstinfo_api.go
- clusterrefs_api.go
- controller.go
- controller_api.go
- debug_api.go
- device_api.go
- dnslabelgen.go
- dummy_info_responder.go
- exec_api.go
- flavor_api.go
- gpudriver_api.go
- network_api.go
- node_api.go
- operatorcode_api.go
- organization_api.go
- platformfeatures_api.go
- ratelimitsettings_api.go
- redis_server.go
- restagtable_api.go
- settings_api.go
- stream_api.go
- sync_lease_data.go
- trustpolicy_api.go
- trustpolicyexception_api.go
- trustpolicyexception_changes.go
- upgrade.go
- upgrade_funcs.go
- version.auto.go
- vmpool_api.go
- vmpoolinfo_api.go