locator

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdClient

type EtcdClient struct {
	// contains filtered or unexported fields
}

func NewEtcdClient

func NewEtcdClient(addresses []string) (*EtcdClient, error)

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
}

func (*Locator) EdgeDownloadInfos

func (l *Locator) EdgeDownloadInfos(ctx context.Context, cid string) ([]*types.EdgeDownloadInfoList, error)

func (*Locator) GetAccessPoints

func (l *Locator) GetAccessPoints(ctx context.Context, nodeID, areaID string) ([]string, error)

GetAccessPoints get schedulers urls with special areaID, and those schedulers have the node

func (*Locator) GetUserAccessPoint

func (l *Locator) GetUserAccessPoint(ctx context.Context, userIP string) (*api.AccessPoint, error)

GetUserAccessPoint get user access point for special user ip

type Storage

type Storage interface {
	GetSchedulerConfigs(areaID string) ([]*types.SchedulerCfg, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL