Documentation ¶
Index ¶
- Constants
- func InitClientNotify(client *notify.Client, nodeMgr *node.NodeMgr, crmd *CRMData, ...)
- func InitDebug(nodeMgr *node.NodeMgr)
- func InitSrvNotify(notifyServer *notify.ServerMgr, nodeMgr *node.NodeMgr, ...)
- func Run(builders map[string]pf.PlatformBuilder)
- func Start(builders map[string]pf.PlatformBuilder) error
- func Stop()
- type CRMData
- func (s *CRMData) FinishInfraResourceRefreshThread()
- func (s *CRMData) FinishUpdateCloudletInfoHAThread()
- func (cd *CRMData) GetCloudletInfoFromHACache(ctx context.Context, cloudletInfo *edgeproto.CloudletInfo) error
- func (s *CRMData) GetClusterEnvoyVersion(ctx context.Context, req *edgeproto.DebugRequest) string
- func (s *CRMData) InitHAManager(ctx context.Context, haMgr *redundancy.HighAvailabilityManager, haKey string, ...) (bool, error)
- func (s *CRMData) RecvAllEnd(ctx context.Context)
- func (s *CRMData) RecvAllStart()
- func (s *CRMData) RefreshAppInstRuntime(ctx context.Context)
- func (s *CRMData) StartHAManagerActiveCheck(ctx context.Context, haMgr *redundancy.HighAvailabilityManager)
- func (s *CRMData) StartInfraResourceRefreshThread()
- func (s *CRMData) StartUpdateCloudletInfoHAThread(ctx context.Context)
- func (s *CRMData) UpdateCloudletInfoAndVersionHACache(ctx context.Context, cloudletInfo *edgeproto.CloudletInfo) error
- func (cd *CRMData) UpdateVMPool(ctx context.Context, k interface{})
- func (cd *CRMData) UpdateVMPoolInfo(ctx context.Context, state edgeproto.TrackedState, errStr string)
- func (cd *CRMData) VMPoolChanged(ctx context.Context, old *edgeproto.VMPool, new *edgeproto.VMPool)
- type CrmHAProcess
- func (s *CrmHAProcess) ActiveChangedPostSwitch(ctx context.Context, haRole string, platformActive bool) error
- func (s *CrmHAProcess) ActiveChangedPreSwitch(ctx context.Context, haRole string, platformActive bool) error
- func (s *CrmHAProcess) DumpWatcherFields(ctx context.Context) map[string]interface{}
- func (s *CrmHAProcess) PlatformActiveOnStartup(ctx context.Context)
- type CrmMetricsReceiver
- type EnvoyContainerVersion
- type ExecReqHandler
- type RootLBEnvoyVersion
Constants ¶
View Source
const ( GetEnvoyVersionCmd = "get-cluster-envoy-version" CRMCmd = "crmcmd" )
View Source
const CloudletInfoCacheKey = "cloudletInfo"
View Source
const CloudletInfoUpdateExpireMultiple = 20 // relative to PlatformHaInstanceActiveExpireTime how long cloudletInfo cache is valid
View Source
const CloudletInfoUpdateRefreshMultiple = 9 // relative to PlatformHaInstanceActiveExpireTime how often to refresh cloudlet info
View Source
const ControllerTimeout = 1 * time.Minute
View Source
const InitCompatibilityVersionKey = "initCompatVersion"
Variables ¶
This section is empty.
Functions ¶
func InitClientNotify ¶
func InitClientNotify(client *notify.Client, nodeMgr *node.NodeMgr, crmd *CRMData, cd *crmutil.CRMHandler)
InitClientNotify initiates the notify send/recv
func InitSrvNotify ¶
func Run ¶
func Run(builders map[string]pf.PlatformBuilder)
Types ¶
type CRMData ¶
type CRMData struct { *crmutil.CRMHandler ControllerWait chan bool ControllerSyncInProgress bool ControllerSyncDone chan bool WaitPlatformActive chan bool PlatformCommonInitDone bool UpdateHACompatibilityVersion bool ExecReqHandler *ExecReqHandler ExecReqSend *notify.ExecRequestSend AppInstInfoCache edgeproto.AppInstInfoCache CloudletInfoCache edgeproto.CloudletInfoCache ClusterInstInfoCache edgeproto.ClusterInstInfoCache VMPool edgeproto.VMPool VMPoolMux sync.Mutex VMPoolUpdateMux sync.Mutex // contains filtered or unexported fields }
CRMData is a wrapper around crmutil.CRMHandler and uses it in the context of the on-edge-site CRM. CRMData is updated via notify, and changes are sent back via notify.
func NewCRMData ¶
func NewCRMData(platform pf.Platform, key *edgeproto.CloudletKey, nodeMgr *node.NodeMgr, haMgr *redundancy.HighAvailabilityManager) *CRMData
func (*CRMData) FinishInfraResourceRefreshThread ¶
func (s *CRMData) FinishInfraResourceRefreshThread()
func (*CRMData) FinishUpdateCloudletInfoHAThread ¶
func (s *CRMData) FinishUpdateCloudletInfoHAThread()
func (*CRMData) GetCloudletInfoFromHACache ¶
func (*CRMData) GetClusterEnvoyVersion ¶
func (*CRMData) InitHAManager ¶
func (s *CRMData) InitHAManager(ctx context.Context, haMgr *redundancy.HighAvailabilityManager, haKey string, cloudletKey *edgeproto.CloudletKey) (bool, error)
InitHAManager returns haEnabled, error
func (*CRMData) RecvAllEnd ¶
func (*CRMData) RecvAllStart ¶
func (s *CRMData) RecvAllStart()
func (*CRMData) RefreshAppInstRuntime ¶
func (*CRMData) StartHAManagerActiveCheck ¶
func (s *CRMData) StartHAManagerActiveCheck(ctx context.Context, haMgr *redundancy.HighAvailabilityManager)
func (*CRMData) StartInfraResourceRefreshThread ¶
func (s *CRMData) StartInfraResourceRefreshThread()
func (*CRMData) StartUpdateCloudletInfoHAThread ¶
func (*CRMData) UpdateCloudletInfoAndVersionHACache ¶
func (s *CRMData) UpdateCloudletInfoAndVersionHACache(ctx context.Context, cloudletInfo *edgeproto.CloudletInfo) error
UpdateCloudletInfoAndVersionHACache updates the value for cloudletInfo and init version that HA Manager has cached in redis
func (*CRMData) UpdateVMPool ¶
func (*CRMData) UpdateVMPoolInfo ¶
func (cd *CRMData) UpdateVMPoolInfo(ctx context.Context, state edgeproto.TrackedState, errStr string)
This func must be called with cd.VMPoolMux lock held
type CrmHAProcess ¶
type CrmHAProcess struct {
// contains filtered or unexported fields
}
func (*CrmHAProcess) ActiveChangedPostSwitch ¶
func (*CrmHAProcess) ActiveChangedPreSwitch ¶
func (*CrmHAProcess) DumpWatcherFields ¶
func (s *CrmHAProcess) DumpWatcherFields(ctx context.Context) map[string]interface{}
func (*CrmHAProcess) PlatformActiveOnStartup ¶
func (s *CrmHAProcess) PlatformActiveOnStartup(ctx context.Context)
type CrmMetricsReceiver ¶
type CrmMetricsReceiver struct{}
func (*CrmMetricsReceiver) RecvMetric ¶
func (r *CrmMetricsReceiver) RecvMetric(ctx context.Context, metric *edgeproto.Metric)
forward to controller
type EnvoyContainerVersion ¶
type ExecReqHandler ¶
type ExecReqHandler struct {
// contains filtered or unexported fields
}
ExecReqHandler just satisfies the Recv() function for the ExecRequest receive notify interface, and calls into the controller data which has all the cached information about the ClusterInst, AppInst, etc.
func NewExecReqHandler ¶
func NewExecReqHandler(cd *CRMData) *ExecReqHandler
func (*ExecReqHandler) RecvExecRequest ¶
func (s *ExecReqHandler) RecvExecRequest(ctx context.Context, msg *edgeproto.ExecRequest)
type RootLBEnvoyVersion ¶
type RootLBEnvoyVersion struct { NodeType string NodeName string EnvoyContainers []EnvoyContainerVersion }
Click to show internal directories.
Click to hide internal directories.