Documentation
¶
Overview ¶
Package control @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package control @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Package control @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License
Index ¶
- type ControlAgent
- func (c *ControlAgent) GetAlpineMirrors(ctx context.Context) string
- func (c *ControlAgent) GetCacheCfg() *storage.CacheConfig
- func (c *ControlAgent) GetGolangMirrors(ctx context.Context) string
- func (c *ControlAgent) GetMavenMirrors(ctx context.Context) string
- func (c *ControlAgent) GetPythonMirrors(ctx context.Context) string
- type ControlAgentConfig
- func (c *ControlAgentConfig) GetAgentConfig() *model.ConfigEncode
- func (c *ControlAgentConfig) OnConfigByAlpine(mirror string)
- func (c *ControlAgentConfig) OnConfigByCache(cache string)
- func (c *ControlAgentConfig) OnConfigByGolang(mirror string, sumdb map[string][]string)
- func (c *ControlAgentConfig) OnConfigByMaven(public, mirror string, repository map[string]*model.MavenRepository)
- func (c *ControlAgentConfig) OnConfigByPython(mirror string)
- func (c *ControlAgentConfig) SetAgentConfig(alpineYaml, golangYaml, mavenYaml, pythonYaml string)
- type ControlDl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlAgent ¶
type ControlAgent struct { }
ControlAgent 控制代理
func (*ControlAgent) GetAlpineMirrors ¶
func (c *ControlAgent) GetAlpineMirrors(ctx context.Context) string
GetAlpineMirrors 获取配置的镜像地址
func (*ControlAgent) GetCacheCfg ¶
func (c *ControlAgent) GetCacheCfg() *storage.CacheConfig
GetCacheCfg 获取配置的资源文件信息
func (*ControlAgent) GetGolangMirrors ¶
func (c *ControlAgent) GetGolangMirrors(ctx context.Context) string
GetGolangMirrors 获取配置的镜像地址
func (*ControlAgent) GetMavenMirrors ¶
func (c *ControlAgent) GetMavenMirrors(ctx context.Context) string
GetMavenMirrors 获取配置的镜像地址
func (*ControlAgent) GetPythonMirrors ¶
func (c *ControlAgent) GetPythonMirrors(ctx context.Context) string
GetPythonMirrors 获取配置的镜像地址
type ControlAgentConfig ¶
type ControlAgentConfig struct { }
ControlAgentConfig 控制代理配置文件
func (*ControlAgentConfig) GetAgentConfig ¶
func (c *ControlAgentConfig) GetAgentConfig() *model.ConfigEncode
GetAgentConfig 获取缓存组件配置的资源文件信息
func (*ControlAgentConfig) OnConfigByAlpine ¶
func (c *ControlAgentConfig) OnConfigByAlpine(mirror string)
OnConfigByAlpine 更新配置的资源文件信息 @param mirror default:"https://mirrors.ustc.edu.cn/alpine/" dc:"镜像地址, 会先尝试在本地加载, 如果加载失败, 会尝试从镜像依次读取"`
func (*ControlAgentConfig) OnConfigByCache ¶
func (c *ControlAgentConfig) OnConfigByCache(cache string)
OnConfigByCache 更新本地缓存配置
func (*ControlAgentConfig) OnConfigByGolang ¶
func (c *ControlAgentConfig) OnConfigByGolang(mirror string, sumdb map[string][]string)
OnConfigByGolang 更新配置的资源文件信息 @param mirror default:"\"https://goproxy.io\"" dc:"镜像地址, 会先尝试在本地加载, 如果加载失败, 会尝试从镜像依次读取"` @param sumdb dc:"sum校验服务器地址,默认使用配置的默认值"` map[string][]string
func (*ControlAgentConfig) OnConfigByMaven ¶
func (c *ControlAgentConfig) OnConfigByMaven(public, mirror string, repository map[string]*model.MavenRepository)
OnConfigByMaven 更新配置的资源文件信息
func (*ControlAgentConfig) OnConfigByPython ¶
func (c *ControlAgentConfig) OnConfigByPython(mirror string)
OnConfigByPython 更新配置的资源文件信息 @param mirror default:"https://pypi.tuna.tsinghua.edu.cn/simple/" dc:"镜像地址, 会先尝试在本地加载, 如果加载失败, 会尝试从镜像依次读取"`
func (*ControlAgentConfig) SetAgentConfig ¶
func (c *ControlAgentConfig) SetAgentConfig(alpineYaml, golangYaml, mavenYaml, pythonYaml string)
SetAgentConfig 设置缓存组件配置的资源文件信息