Documentation
¶
Index ¶
- Constants
- Variables
- type CCRM
- type CCRMCaches
- type CCRMHandler
- func (s *CCRMHandler) ApplyAppInst(in *edgeproto.AppInst, stream edgeproto.AppInstPlatformAPI_ApplyAppInstServer) error
- func (s *CCRMHandler) ApplyCloudlet(in *edgeproto.Cloudlet, ...) error
- func (s *CCRMHandler) ApplyClusterInst(in *edgeproto.ClusterInst, ...) error
- func (s *CCRMHandler) ApplyTrustPolicyException(ctx context.Context, in *edgeproto.TPEInstanceState) (*edgeproto.Result, error)
- func (s *CCRMHandler) CreateCloudletNodeReq(ctx context.Context, node *edgeproto.CloudletNode) (string, error)
- func (s *CCRMHandler) DeleteCloudletNodeReq(ctx context.Context, nodeKey *edgeproto.CloudletNodeKey) error
- func (s *CCRMHandler) GetCloudletManifest(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.CloudletManifest, error)
- func (s *CCRMHandler) GetCloudletResources(ctx context.Context, in *edgeproto.Cloudlet) (*edgeproto.InfraResourceMap, error)
- func (s *CCRMHandler) GetClusterAdditionalResourceMetric(ctx context.Context, in *edgeproto.ClusterResourceMetricReq) (*edgeproto.Metric, error)
- func (s *CCRMHandler) GetClusterAdditionalResources(ctx context.Context, in *edgeproto.ClusterResourcesReq) (*edgeproto.InfraResourceMap, error)
- func (s *CCRMHandler) GetPlatformCache() *CRMPlatformCache
- func (s *CCRMHandler) GetRestrictedCloudletStatus(key *edgeproto.CloudletKey, ...) error
- func (s *CCRMHandler) GetRootLbFlavor(ctx context.Context, in *edgeproto.CloudletKey) (*edgeproto.Flavor, error)
- func (s *CCRMHandler) Init(ctx context.Context, nodeMgr *node.NodeMgr, caches *CCRMCaches, ...)
- func (s *CCRMHandler) InitConnectivity(client *notify.Client, kvstore objstore.KVStore, nodeMgr *node.NodeMgr, ...)
- func (s *CCRMHandler) NameSanitize(ctx context.Context, in *edgeproto.NameSanitizeReq) (*edgeproto.Result, error)
- func (s *CCRMHandler) ProcessExecRequest(ctx context.Context, in *edgeproto.CloudletExecReq) (*edgeproto.ExecRequest, error)
- func (s *CCRMHandler) RecvFedAppInstEvent(ctx context.Context, msg *edgeproto.FedAppInstEvent)
- func (s *CCRMHandler) RefreshCerts(ctx context.Context, in *edgeproto.Cloudlet) (*edgeproto.Result, error)
- func (s *CCRMHandler) Start(ctx context.Context, ctrlConn *grpc.ClientConn)
- func (s *CCRMHandler) Stop()
- type CRMPlatformCache
- func (s *CRMPlatformCache) Delete(key *edgeproto.CloudletKey)
- func (s *CRMPlatformCache) Get(key *edgeproto.CloudletKey) (platform.Platform, bool)
- func (s *CRMPlatformCache) GetAll() []platform.Platform
- func (s *CRMPlatformCache) Init()
- func (s *CRMPlatformCache) Set(key *edgeproto.CloudletKey, pf platform.Platform)
- type Flags
- type MessageHandler
- type NodeAttributesCache
- type NodeAttributesData
Constants ¶
View Source
const RedisKeepAliveInterval = 3 * time.Second
View Source
const RouteNode = "confignode"
Variables ¶
View Source
var ( // TODO: This needs to be configurable DefaultPlatformFlavor = edgeproto.Flavor{ Key: cloudcommon.DefaultPlatformFlavorKey, Vcpus: 2, Ram: 4096, Disk: 20, } )
View Source
var ErrIgnoreForCrmOnEdge = errors.New("ignoring request because crmOnEdge is set")
View Source
var ErrPlatformNotFound = errors.New("platform not found")
Functions ¶
This section is empty.
Types ¶
type CCRM ¶
type CCRM struct {
// contains filtered or unexported fields
}
CCRM handles platform-specific code. It primarily converts notify-based events into platform API calls. CCRM should run alongside the Controller.
func NewCCRM ¶
func NewCCRM(nodeType string, platformBuilders map[string]platform.PlatformBuilder) *CCRM
NewCCRM creates a new CCRM. The nodeType identifies the service if there are other 3rd party CCRMs present, allowing requests for certain platforms to be directed to the correct CCRM type. New implementations must use their own unique node type. PlatformBuilders provide the platforms supported by the CCRM.
type CCRMCaches ¶
type CCRMCaches struct { PlatformFeaturesCache edgeproto.PlatformFeaturesCache CloudletNodeCache edgeproto.CloudletNodeCache AppInstInfoCache edgeproto.AppInstInfoCache CloudletInfoCache edgeproto.CloudletInfoCache ClusterInstInfoCache edgeproto.ClusterInstInfoCache }
func (*CCRMCaches) Init ¶
func (s *CCRMCaches) Init(ctx context.Context)
type CCRMHandler ¶
type CCRMHandler struct {
// contains filtered or unexported fields
}
func (*CCRMHandler) ApplyAppInst ¶
func (s *CCRMHandler) ApplyAppInst(in *edgeproto.AppInst, stream edgeproto.AppInstPlatformAPI_ApplyAppInstServer) error
ApplyAppInst implements a GRPC AppInstPlatform server method
func (*CCRMHandler) ApplyCloudlet ¶
func (s *CCRMHandler) ApplyCloudlet(in *edgeproto.Cloudlet, stream edgeproto.CloudletPlatformAPI_ApplyCloudletServer) error
ApplyCloudlet implements a GRPC CloudletPlatform server method
func (*CCRMHandler) ApplyClusterInst ¶
func (s *CCRMHandler) ApplyClusterInst(in *edgeproto.ClusterInst, stream edgeproto.ClusterPlatformAPI_ApplyClusterInstServer) error
ApplyClusterInst implements a GRPC ClusterInstPlatform server method
func (*CCRMHandler) ApplyTrustPolicyException ¶
func (s *CCRMHandler) ApplyTrustPolicyException(ctx context.Context, in *edgeproto.TPEInstanceState) (*edgeproto.Result, error)
func (*CCRMHandler) CreateCloudletNodeReq ¶
func (s *CCRMHandler) CreateCloudletNodeReq(ctx context.Context, node *edgeproto.CloudletNode) (string, error)
func (*CCRMHandler) DeleteCloudletNodeReq ¶
func (s *CCRMHandler) DeleteCloudletNodeReq(ctx context.Context, nodeKey *edgeproto.CloudletNodeKey) error
func (*CCRMHandler) GetCloudletManifest ¶
func (s *CCRMHandler) GetCloudletManifest(ctx context.Context, key *edgeproto.CloudletKey) (*edgeproto.CloudletManifest, error)
func (*CCRMHandler) GetCloudletResources ¶
func (s *CCRMHandler) GetCloudletResources(ctx context.Context, in *edgeproto.Cloudlet) (*edgeproto.InfraResourceMap, error)
func (*CCRMHandler) GetClusterAdditionalResourceMetric ¶
func (s *CCRMHandler) GetClusterAdditionalResourceMetric(ctx context.Context, in *edgeproto.ClusterResourceMetricReq) (*edgeproto.Metric, error)
func (*CCRMHandler) GetClusterAdditionalResources ¶
func (s *CCRMHandler) GetClusterAdditionalResources(ctx context.Context, in *edgeproto.ClusterResourcesReq) (*edgeproto.InfraResourceMap, error)
func (*CCRMHandler) GetPlatformCache ¶
func (s *CCRMHandler) GetPlatformCache() *CRMPlatformCache
func (*CCRMHandler) GetRestrictedCloudletStatus ¶
func (s *CCRMHandler) GetRestrictedCloudletStatus(key *edgeproto.CloudletKey, stream edgeproto.CloudletPlatformAPI_GetRestrictedCloudletStatusServer) error
func (*CCRMHandler) GetRootLbFlavor ¶
func (s *CCRMHandler) GetRootLbFlavor(ctx context.Context, in *edgeproto.CloudletKey) (*edgeproto.Flavor, error)
func (*CCRMHandler) Init ¶
func (s *CCRMHandler) Init(ctx context.Context, nodeMgr *node.NodeMgr, caches *CCRMCaches, platformBuilders map[string]platform.PlatformBuilder, flags *Flags, registryAuthAPI cloudcommon.RegistryAuthApi)
func (*CCRMHandler) InitConnectivity ¶
func (*CCRMHandler) NameSanitize ¶
func (s *CCRMHandler) NameSanitize(ctx context.Context, in *edgeproto.NameSanitizeReq) (*edgeproto.Result, error)
func (*CCRMHandler) ProcessExecRequest ¶
func (s *CCRMHandler) ProcessExecRequest(ctx context.Context, in *edgeproto.CloudletExecReq) (*edgeproto.ExecRequest, error)
func (*CCRMHandler) RecvFedAppInstEvent ¶
func (s *CCRMHandler) RecvFedAppInstEvent(ctx context.Context, msg *edgeproto.FedAppInstEvent)
func (*CCRMHandler) RefreshCerts ¶
func (*CCRMHandler) Start ¶
func (s *CCRMHandler) Start(ctx context.Context, ctrlConn *grpc.ClientConn)
func (*CCRMHandler) Stop ¶
func (s *CCRMHandler) Stop()
type CRMPlatformCache ¶
type CRMPlatformCache struct {
// contains filtered or unexported fields
}
func (*CRMPlatformCache) Delete ¶
func (s *CRMPlatformCache) Delete(key *edgeproto.CloudletKey)
func (*CRMPlatformCache) Get ¶
func (s *CRMPlatformCache) Get(key *edgeproto.CloudletKey) (platform.Platform, bool)
func (*CRMPlatformCache) GetAll ¶
func (s *CRMPlatformCache) GetAll() []platform.Platform
func (*CRMPlatformCache) Init ¶
func (s *CRMPlatformCache) Init()
func (*CRMPlatformCache) Set ¶
func (s *CRMPlatformCache) Set(key *edgeproto.CloudletKey, pf platform.Platform)
type Flags ¶
type Flags struct { Region string AppDNSRoot string DnsZone string CloudletRegistryPath string CloudletVMImagePath string APIAddr string EtcdURLs string EnvoyWithCurlImage string NginxWithCurlImage string VersionTag string CommercialCerts bool ControllerAPIAddr string ControllerNotifyAddr string ControllerPublicNotifyAddr string ControllerPublicAccessApiAddr string AnsibleListenAddr string AnsiblePublicAddr string ThanosRecvAddr string FederationExternalAddr string DebugLevels string TestMode bool }
func (*Flags) GetPlatformRegistryPath ¶
type MessageHandler ¶
type NodeAttributesCache ¶
type NodeAttributesCache struct {
// contains filtered or unexported fields
}
func (*NodeAttributesCache) Get ¶
func (s *NodeAttributesCache) Get(key edgeproto.CloudletNodeKey) (NodeAttributesData, bool)
func (*NodeAttributesCache) Init ¶
func (s *NodeAttributesCache) Init()
func (*NodeAttributesCache) Update ¶
func (s *NodeAttributesCache) Update(key edgeproto.CloudletNodeKey, yamlData []byte, checksum string)
type NodeAttributesData ¶
type NodeAttributesData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.