阅读本文,您可以获取 Go SDK 客户端状态监控的接口调用示例,实现快速开发。
调用接口前,请先完成 Go SDK 的安装及初始化操作。
本节为您介绍客户端状态监控相关接口的功能和调用示例。
您可以调用 DescribeImageXClientErrorCodeAll 接口指定查询维度获取客户端状态监控的错误码分布数据。详细的参数说明可参见 DescribeImageXClientErrorCodeAll 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientErrorCodeAll(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientErrorCodeAllBody{} resp, err := instance.DescribeImageXClientErrorCodeAll(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientErrorCodeByTime 接口指定查询维度获取客户端状态监控的错误码时序数据。详细的参数说明可参见 DescribeImageXClientErrorCodeByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientErrorCodeByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientErrorCodeByTimeBody{} resp, err := instance.DescribeImageXClientErrorCodeByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientDecodeSuccessRateByTime 接口指定查询维度获取客户端状态监控的解码成功率数据。详细的参数说明可参见 DescribeImageXClientDecodeSuccessRateByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientDecodeSuccessRateByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientDecodeSuccessRateByTimeBody{} resp, err := instance.DescribeImageXClientDecodeSuccessRateByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientDecodeDurationByTime 接口指定查询维度获取客户端状态监控的解码耗时数据。详细的参数说明可参见 DescribeImageXClientDecodeDurationByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientDecodeDurationByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientDecodeDurationByTimeBody{} resp, err := instance.DescribeImageXClientDecodeDurationByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientQueueDurationByTime 接口指定查询维度获取客户端状态监控的排队耗时数据。详细的参数说明可参见 DescribeImageXClientQueueDurationByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientQueueDurationByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientQueueDurationByTimeBody{} resp, err := instance.DescribeImageXClientQueueDurationByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientLoadDurationAll 接口指定查询维度获取客户端状态监控的加载耗时分布数据。详细的参数说明可参见 DescribeImageXClientLoadDurationAll 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientLoadDurationAll(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientLoadDurationAllBody{} resp, err := instance.DescribeImageXClientLoadDurationAll(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientLoadDuration 接口指定查询维度获取客户端状态监控的加载耗时时序数据。详细的参数说明可参见 DescribeImageXClientLoadDuration 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientLoadDuration(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientLoadDurationBody{} resp, err := instance.DescribeImageXClientLoadDuration(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientFailureRate 接口指定查询维度获取客户端状态监控的用户感知失败率数据。详细的参数说明可参见 DescribeImageXClientFailureRate 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientFailureRate(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientFailureRateBody{} resp, err := instance.DescribeImageXClientFailureRate(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientSdkVerByTime 接口指定查询维度获取客户端状态监控的 SDK 版本变化趋势数据。详细的参数说明可参见 DescribeImageXClientSdkVerByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientSdkVerByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientSdkVerByTimeBody{} resp, err := instance.DescribeImageXClientSdkVerByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientFileSize 接口指定查询维度获取客户端状态监控的文件大小分布数据。详细的参数说明可参见 DescribeImageXClientFileSize 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientFileSize(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientFileSizeBody{} resp, err := instance.DescribeImageXClientFileSize(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientTopFileSize 接口指定查询维度获取客户端状态监控的文件大小 TOP URL。详细的参数说明可参见 DescribeImageXClientTopFileSize 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientTopFileSize(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientTopFileSizeBody{} resp, err := instance.DescribeImageXClientTopFileSize(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientCountByTime 接口指定查询维度获取客户端状态监控的客户端上报量数据。详细的参数说明可参见 DescribeImageXClientCountByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientCountByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientCountByTimeBody{} resp, err := instance.DescribeImageXClientCountByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientScoreByTime 接口指定查询维度获取画质评估上报数据。详细的参数说明可参见 DescribeImageXClientScoreByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientScoreByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientScoreByTimeBody{} resp, err := instance.DescribeImageXClientScoreByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientDemotionRateByTime 接口指定查询维度获取客户端状态监控的处理降级成功率时序数据。详细的参数说明可参见 DescribeImageXClientDemotionRateByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientDemotionRateByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientDemotionRateByTimeBody{} resp, err := instance.DescribeImageXClientDemotionRateByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientTopDemotionURL 接口指定查询维度获取客户端状态监控的降级率 TOP URL 数据明细。详细的参数说明可参见 DescribeImageXClientTopDemotionURL 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientTopDemotionURL(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientTopDemotionURLBody{} resp, err := instance.DescribeImageXClientTopDemotionURL(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientQualityRateByTime 接口指定查询维度获取客户端状态监控的黑白屏率时序数据。详细的参数说明可参见 DescribeImageXClientQualityRateByTime 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientQualityRateByTime(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientQualityRateByTimeBody{} resp, err := instance.DescribeImageXClientQualityRateByTime(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }
您可以调用 DescribeImageXClientTopQualityURL 接口指定查询维度获取客户端状态监控的黑白屏 Top URL 数据明细。详细的参数说明可参见 DescribeImageXClientTopQualityURL 接口文档。
接口调用示例如下所示。
package imagex_test import ( "context" "encoding/json" "fmt" "testing" "github.com/volcengine/volc-sdk-golang/base" imagex "github.com/volcengine/volc-sdk-golang/service/imagex/v2" ) func Test_DescribeImageXClientTopQualityURL(t *testing.T) { instance := imagex.NewInstance() instance.SetCredential(base.Credentials{ AccessKeyID: "ak", SecretAccessKey: "sk", }) param := &imagex.DescribeImageXClientTopQualityURLBody{} resp, err := instance.DescribeImageXClientTopQualityURL(context.Background(), param) if err != nil { fmt.Printf("error %v", err) } else { t, _ := json.Marshal(resp) fmt.Printf("success %v", string(t)) } }