Documentation ¶
Index ¶
- func NewRegion(config *config.LocatorCfg) region.Region
- type DNSServer
- type EtcdClient
- type Locator
- func (l *Locator) AllocateSchedulerForNode(ctx context.Context, nodeType types.NodeType, code string) (string, error)
- func (l *Locator) CandidateDownloadInfos(ctx context.Context, cid string) ([]*types.CandidateDownloadInfo, error)
- func (l *Locator) EdgeDownloadInfos(ctx context.Context, cid string) ([]*types.EdgeDownloadInfoList, error)
- func (l *Locator) GetAccessPoints(ctx context.Context, nodeID, areaID string) ([]string, error)
- func (l *Locator) GetAccessPointsV2(ctx context.Context, nodeID, areaID string) (*types.AccessPointRsp, error)
- func (l *Locator) GetAssetSourceDownloadInfos(ctx context.Context, cid string) ([]*types.AssetSourceDownloadInfoRsp, error)
- func (l *Locator) GetCandidateIP(ctx context.Context, nodeID string) (string, error)
- func (l *Locator) GetDeploymentCandidateIP(ctx context.Context, deploymentID string) (string, error)
- func (l *Locator) GetSchedulerWithNode(ctx context.Context, nodeID string) (string, error)
- func (l *Locator) GetUserAccessPoint(ctx context.Context, userIP string) (*api.AccessPoint, error)
- type SafeMap
- type SchedulerAPI
- type SchedulerAPIMap
- type Storage
- type TXTRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DNSServer ¶ added in v0.1.10
type DNSServer struct { *config.LocatorCfg api.Locator // contains filtered or unexported fields }
func NewDNSServer ¶ added in v0.1.10
func (*DNSServer) DeleteTXTRecord ¶ added in v0.1.11
type EtcdClient ¶
type EtcdClient struct {
// contains filtered or unexported fields
}
func NewEtcdClient ¶
func NewEtcdClient(addresses []string) (*EtcdClient, error)
func (*EtcdClient) GetAllSchedulerConfigs ¶ added in v0.1.11
func (ec *EtcdClient) GetAllSchedulerConfigs() []*types.SchedulerCfg
func (*EtcdClient) GetSchedulerConfigs ¶
func (ec *EtcdClient) GetSchedulerConfigs(areaID string) ([]*types.SchedulerCfg, error)
type Locator ¶
type Locator struct { fx.In *common.CommonAPI region.Region Storage *config.LocatorCfg *DNSServer Rand *rand.Rand ScheduelrAPIs SchedulerAPIMap }
func (*Locator) AllocateSchedulerForNode ¶ added in v0.1.19
func (*Locator) CandidateDownloadInfos ¶ added in v0.1.10
func (*Locator) EdgeDownloadInfos ¶
func (*Locator) GetAccessPoints ¶
GetAccessPoints get schedulers urls with special areaID, and those schedulers have the node
func (*Locator) GetAccessPointsV2 ¶ added in v0.1.21
func (l *Locator) GetAccessPointsV2(ctx context.Context, nodeID, areaID string) (*types.AccessPointRsp, error)
GetAccessPointsV2 get schedulers urls with special areaID, and those schedulers have the node
func (*Locator) GetAssetSourceDownloadInfos ¶ added in v0.1.18
func (l *Locator) GetAssetSourceDownloadInfos(ctx context.Context, cid string) ([]*types.AssetSourceDownloadInfoRsp, error)
GetAssetSourceDownloadInfo
func (*Locator) GetCandidateIP ¶ added in v0.1.11
GetCandidateIP retrieves ip of candidate
func (*Locator) GetDeploymentCandidateIP ¶ added in v0.1.21
func (l *Locator) GetDeploymentCandidateIP(ctx context.Context, deploymentID string) (string, error)
GetDeploymentCandidateIP retrieves candidate ip of deployment
func (*Locator) GetSchedulerWithNode ¶ added in v0.1.11
GetSchedulerWithNode get the scheduler that the node is already connected to
func (*Locator) GetUserAccessPoint ¶
GetUserAccessPoint get user access point for special user ip
type SafeMap ¶ added in v0.1.11
type SafeMap struct {
// contains filtered or unexported fields
}
It differs from sync.map by the addition of the len() function sync.map can not delete item on range
func NewSafeMap ¶ added in v0.1.11
func NewSafeMap() *SafeMap
type SchedulerAPI ¶ added in v0.1.14
type SchedulerAPIMap ¶ added in v0.1.14
type SchedulerAPIMap map[string]*SchedulerAPI
type Storage ¶
type Storage interface { GetSchedulerConfigs(areaID string) ([]*types.SchedulerCfg, error) GetAllSchedulerConfigs() []*types.SchedulerCfg }
Click to show internal directories.
Click to hide internal directories.