Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶ added in v0.5.2
func DownloadFile(ctx context.Context, httpClient *http.Client, accessKey, downloadURL, filePath string) error
DownloadFile 公共的文件下载函数,可被所有客户端复用
func TestProviderConnection ¶ added in v0.5.2
TestProviderConnection 测试提供商连接
Types ¶
type BusinessExecutor ¶ added in v0.5.2
type BusinessExecutor struct {
// contains filtered or unexported fields
}
BusinessExecutor 业务执行器,封装可复用的业务逻辑
func NewBusinessExecutor ¶ added in v0.5.2
func NewBusinessExecutor(downloadFile func(downloadURL, filePath string) error) *BusinessExecutor
NewBusinessExecutor 创建业务执行器
func (*BusinessExecutor) ExecuteBusiness ¶ added in v0.5.2
func (be *BusinessExecutor) ExecuteBusiness(providerName string, executeBusinesType deployPB.ExecuteBusinesType, domain, downloadURL, remark, cert, key string) error
ExecuteBusiness 执行业务(根据提供商和业务类型)
type ClientInterface ¶ added in v0.5.2
type ClientInterface interface {
GetClientID() string
GetAccessKey() string
GetContext() context.Context
GetHTTPClient() *http.Client
// contains filtered or unexported methods
}
ClientInterface 客户端接口,用于复用业务逻辑
type ProviderInfo ¶ added in v0.5.2
ProviderInfo 提供商信息
func GetProviderInfo ¶ added in v0.5.2
func GetProviderInfo() []ProviderInfo
GetProviderInfo 获取提供商信息列表
type UpdateHandler ¶ added in v0.5.2
type UpdateHandler struct {
// contains filtered or unexported fields
}
UpdateHandler 版本更新处理器
func NewUpdateHandler ¶ added in v0.5.2
func NewUpdateHandler(ctx context.Context) *UpdateHandler
NewUpdateHandler 创建版本更新处理器
func (*UpdateHandler) HandleUpdate ¶ added in v0.5.2
func (uh *UpdateHandler) HandleUpdate()
HandleUpdate 处理版本更新
type WSClient ¶ added in v0.5.2
type WSClient struct {
// contains filtered or unexported fields
}
func NewWSClient ¶ added in v0.5.2
NewWSClient 创建新的 WebSocket 客户端
func (*WSClient) GetAccessKey ¶ added in v0.5.2
func (*WSClient) GetClientID ¶ added in v0.5.2
func (*WSClient) GetServerURL ¶ added in v0.5.2
func (*WSClient) SetHTTPServer ¶ added in v0.5.2
func (c *WSClient) SetHTTPServer(httpServer *server.HTTPServer)
func (*WSClient) StartWSNotify ¶ added in v0.5.2
func (c *WSClient) StartWSNotify()
StartWSNotify 启动 WebSocket 连接和重连循环
Source Files
¶
Click to show internal directories.
Click to hide internal directories.