client

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func TestProviderConnection(providerName string) (bool, error)

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

type ProviderInfo struct {
	Name   string
	Remark string
}

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

func NewWSClient(ctx context.Context) (*WSClient, error)

NewWSClient 创建新的 WebSocket 客户端

func (*WSClient) Close added in v0.5.2

func (c *WSClient) Close() error

Close 关闭 WebSocket 连接

func (*WSClient) GetAccessKey added in v0.5.2

func (c *WSClient) GetAccessKey() string

func (*WSClient) GetClientID added in v0.5.2

func (c *WSClient) GetClientID() string

func (*WSClient) GetServerURL added in v0.5.2

func (c *WSClient) GetServerURL() string

func (*WSClient) SetHTTPServer added in v0.5.2

func (c *WSClient) SetHTTPServer(httpServer *server.HTTPServer)

func (*WSClient) Start added in v0.5.2

func (c *WSClient) Start()

func (*WSClient) StartWSNotify added in v0.5.2

func (c *WSClient) StartWSNotify()

StartWSNotify 启动 WebSocket 连接和重连循环

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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