diff --git a/CHANGELOG.md b/CHANGELOG.md index adda0b8..19f6ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # vNext +# Release 3.0.0 +- AP详情添加enabled字段,表示这个AP是否已被管理员禁用 +- 修复GetContainerLogsRealtime连接错误导致panic的bug +- 下线CreateServiceVolume/SyncCreateServiceVolume接口 + # Release 2.4.0 - 新增app配额查询接口 - 新增 app spec 申请接口 diff --git a/kirksdk/kirksdk.go b/kirksdk/kirksdk.go index 6d935f5..bca5a1e 100644 --- a/kirksdk/kirksdk.go +++ b/kirksdk/kirksdk.go @@ -1,3 +1,3 @@ package kirksdk -const Version = "2.4.0" +const Version = "3.0.0" diff --git a/kirksdk/qcos_api.go b/kirksdk/qcos_api.go index f8c1669..17e03e0 100644 --- a/kirksdk/qcos_api.go +++ b/kirksdk/qcos_api.go @@ -114,12 +114,12 @@ type QcosClient interface { // POST /v3/stacks//services//volumes // Async // Deprecated - CreateServiceVolume(ctx context.Context, stackName string, - serviceName string, args CreateServiceVolumeArgs) (err error) + //CreateServiceVolume(ctx context.Context, stackName string, + //serviceName string, args CreateServiceVolumeArgs) (err error) // Sync // Deprecated - SyncCreateServiceVolume(ctx context.Context, stackName string, - serviceName string, args CreateServiceVolumeArgs) (err error) + //SyncCreateServiceVolume(ctx context.Context, stackName string, + //serviceName string, args CreateServiceVolumeArgs) (err error) // POST /v3/stacks//services//volumes//extend // Async @@ -668,6 +668,7 @@ type FullApInfo struct { Provider string `json:"provider"` Bandwidth int `json:"bandwidthMbps"` Traffic int `json:"trafficBytes"` + Enabled bool `json:"enabled"` UserDomains []string `json:"userDomains,omitempty"` Host string `json:"host,omitempty"` UnitType string `json:"unitType,omitempty"` diff --git a/kirksdk/qcos_client.go b/kirksdk/qcos_client.go index ce46e39..a433595 100644 --- a/kirksdk/qcos_client.go +++ b/kirksdk/qcos_client.go @@ -414,7 +414,7 @@ func (p *qcosClientImp) DeleteService(ctx context.Context, stackName string, ser } // POST /v3/stacks//services//volumes -func (p *qcosClientImp) CreateServiceVolume(ctx context.Context, stackName string, +/*func (p *qcosClientImp) CreateServiceVolume(ctx context.Context, stackName string, serviceName string, args CreateServiceVolumeArgs) (err error) { if stackName == "" { @@ -437,7 +437,7 @@ func (p *qcosClientImp) SyncCreateServiceVolume(ctx context.Context, stackName s return } return -} +}*/ // POST /v3/stacks//services//volumes//extend func (p *qcosClientImp) ExtendServiceVolume(ctx context.Context, stackName string, @@ -881,14 +881,18 @@ func (p *qcosClientImp) GetContainerLogsRealtime(ctx context.Context, ip, since, if !isSSL { conn, err = net.DialTimeout("tcp", host, 10*time.Second) if err != nil { - conn.Close() + if conn != nil { + conn.Close() + } err = fmt.Errorf("net.DialTimeout err: %v", err) return } } else { conn, err = tls.DialWithDialer(&net.Dialer{Timeout: 10 * time.Second}, "tcp", host, nil) if err != nil { - conn.Close() + if conn != nil { + conn.Close() + } err = fmt.Errorf("tls.DialWithDialer err: %v", err) return }