pts

package
v1.62.152 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EndpointMap map[string]string

EndpointMap Endpoint Data

View Source
var EndpointType = "central"

EndpointType regional or central

Functions

func GetEndpointMap

func GetEndpointMap() map[string]string

GetEndpointMap Get Endpoint Data Map

func GetEndpointType

func GetEndpointType() string

GetEndpointType Get Endpoint Type Value

func SetClientProperty

func SetClientProperty(client *Client, propertyName string, propertyValue interface{})

SetClientProperty Set Property by Reflect

func SetEndpointDataToClient

func SetEndpointDataToClient(client *Client)

SetEndpointDataToClient Set EndpointMap and ENdpointType

Types

type AgentLocations

type AgentLocations struct {
	AgentLocation []string `json:"AgentLocation" xml:"AgentLocation"`
}

AgentLocations is a nested struct in pts response

type Client

type Client struct {
	sdk.Client
}

Client is the sdk client struct, each func corresponds to an OpenAPI

func NewClient

func NewClient() (client *Client, err error)

NewClient creates a sdk client with environment variables

func NewClientWithAccessKey

func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)

NewClientWithAccessKey is a shortcut to create sdk client with accesskey usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithEcsRamRole

func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)

NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithOptions

func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error)

NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential this is the common api to create a sdk client

func NewClientWithProvider

func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)

NewClientWithProvider creates a sdk client with providers usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithRamRoleArn

func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithRamRoleArnAndPolicy

func NewClientWithRamRoleArnAndPolicy(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName, policy string) (client *Client, err error)

NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn and policy usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithRsaKeyPair

func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)

NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func NewClientWithStsToken

func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)

NewClientWithStsToken is a shortcut to create sdk client with sts token usage: https://github.com/aliyun/alibaba-cloud-sdk-go/blob/master/docs/2-Client-EN.md

func (*Client) GetReport

func (client *Client) GetReport(request *GetReportRequest) (response *GetReportResponse, err error)

GetReport invokes the pts.GetReport API synchronously api document: https://help.aliyun.com/api/pts/getreport.html

func (*Client) GetReportWithCallback

func (client *Client) GetReportWithCallback(request *GetReportRequest, callback func(response *GetReportResponse, err error)) <-chan int

GetReportWithCallback invokes the pts.GetReport API asynchronously api document: https://help.aliyun.com/api/pts/getreport.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) GetReportWithChan

func (client *Client) GetReportWithChan(request *GetReportRequest) (<-chan *GetReportResponse, <-chan error)

GetReportWithChan invokes the pts.GetReport API asynchronously api document: https://help.aliyun.com/api/pts/getreport.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) QueryPlanStatus

func (client *Client) QueryPlanStatus(request *QueryPlanStatusRequest) (response *QueryPlanStatusResponse, err error)

QueryPlanStatus invokes the pts.QueryPlanStatus API synchronously api document: https://help.aliyun.com/api/pts/queryplanstatus.html

func (*Client) QueryPlanStatusWithCallback

func (client *Client) QueryPlanStatusWithCallback(request *QueryPlanStatusRequest, callback func(response *QueryPlanStatusResponse, err error)) <-chan int

QueryPlanStatusWithCallback invokes the pts.QueryPlanStatus API asynchronously api document: https://help.aliyun.com/api/pts/queryplanstatus.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) QueryPlanStatusWithChan

func (client *Client) QueryPlanStatusWithChan(request *QueryPlanStatusRequest) (<-chan *QueryPlanStatusResponse, <-chan error)

QueryPlanStatusWithChan invokes the pts.QueryPlanStatus API asynchronously api document: https://help.aliyun.com/api/pts/queryplanstatus.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) StartScene

func (client *Client) StartScene(request *StartSceneRequest) (response *StartSceneResponse, err error)

StartScene invokes the pts.StartScene API synchronously api document: https://help.aliyun.com/api/pts/startscene.html

func (*Client) StartSceneWithCallback

func (client *Client) StartSceneWithCallback(request *StartSceneRequest, callback func(response *StartSceneResponse, err error)) <-chan int

StartSceneWithCallback invokes the pts.StartScene API asynchronously api document: https://help.aliyun.com/api/pts/startscene.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

func (*Client) StartSceneWithChan

func (client *Client) StartSceneWithChan(request *StartSceneRequest) (<-chan *StartSceneResponse, <-chan error)

StartSceneWithChan invokes the pts.StartScene API asynchronously api document: https://help.aliyun.com/api/pts/startscene.html asynchronous document: https://help.aliyun.com/document_detail/66220.html

type GetReportRequest

type GetReportRequest struct {
	*requests.RpcRequest
	ReportId requests.Integer `position:"Query" name:"ReportId"`
}

GetReportRequest is the request struct for api GetReport

func CreateGetReportRequest

func CreateGetReportRequest() (request *GetReportRequest)

CreateGetReportRequest creates a request to invoke GetReport API

type GetReportResponse

type GetReportResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Code      string `json:"Code" xml:"Code"`
	Message   string `json:"Message" xml:"Message"`
	Success   bool   `json:"Success" xml:"Success"`
	Snapshot  string `json:"Snapshot" xml:"Snapshot"`
	Summary   string `json:"Summary" xml:"Summary"`
}

GetReportResponse is the response struct for api GetReport

func CreateGetReportResponse

func CreateGetReportResponse() (response *GetReportResponse)

CreateGetReportResponse creates a response to parse from GetReport response

type MonitorData

type MonitorData struct {
	Data []map[string]interface{} `json:"Data" xml:"Data"`
}

MonitorData is a nested struct in pts response

type QueryPlanStatusRequest

type QueryPlanStatusRequest struct {
	*requests.RpcRequest
	ReportId requests.Integer `position:"Query" name:"ReportId"`
	SceneId  requests.Integer `position:"Query" name:"SceneId"`
}

QueryPlanStatusRequest is the request struct for api QueryPlanStatus

func CreateQueryPlanStatusRequest

func CreateQueryPlanStatusRequest() (request *QueryPlanStatusRequest)

CreateQueryPlanStatusRequest creates a request to invoke QueryPlanStatus API

type QueryPlanStatusResponse

type QueryPlanStatusResponse struct {
	*responses.BaseResponse
	RequestId           string         `json:"RequestId" xml:"RequestId"`
	Code                string         `json:"Code" xml:"Code"`
	Message             string         `json:"Message" xml:"Message"`
	Success             bool           `json:"Success" xml:"Success"`
	Tips                string         `json:"Tips" xml:"Tips"`
	RequestCount        string         `json:"RequestCount" xml:"RequestCount"`
	Vum                 int            `json:"Vum" xml:"Vum"`
	BpsRequest          string         `json:"BpsRequest" xml:"BpsRequest"`
	BpsResponse         string         `json:"BpsResponse" xml:"BpsResponse"`
	FailedRequestCount  int            `json:"FailedRequestCount" xml:"FailedRequestCount"`
	FailedBusinessCount int            `json:"FailedBusinessCount" xml:"FailedBusinessCount"`
	Concurrency         int            `json:"Concurrency" xml:"Concurrency"`
	ConcurrencyLimit    int            `json:"ConcurrencyLimit" xml:"ConcurrencyLimit"`
	Tps                 int            `json:"Tps" xml:"Tps"`
	TpsLimit            int            `json:"TpsLimit" xml:"TpsLimit"`
	AliveAgentCount     int            `json:"AliveAgentCount" xml:"AliveAgentCount"`
	TotalAgentCount     int            `json:"TotalAgentCount" xml:"TotalAgentCount"`
	Seg90Rt             int            `json:"Seg90Rt" xml:"Seg90Rt"`
	AverageRt           int            `json:"AverageRt" xml:"AverageRt"`
	ReportId            int64          `json:"ReportId" xml:"ReportId"`
	StartTime           int64          `json:"StartTime" xml:"StartTime"`
	CurrentTime         int64          `json:"CurrentTime" xml:"CurrentTime"`
	MonitorData         MonitorData    `json:"MonitorData" xml:"MonitorData"`
	AgentLocations      AgentLocations `json:"AgentLocations" xml:"AgentLocations"`
}

QueryPlanStatusResponse is the response struct for api QueryPlanStatus

func CreateQueryPlanStatusResponse

func CreateQueryPlanStatusResponse() (response *QueryPlanStatusResponse)

CreateQueryPlanStatusResponse creates a response to parse from QueryPlanStatus response

type StartSceneRequest

type StartSceneRequest struct {
	*requests.RpcRequest
	SceneId requests.Integer `position:"Query" name:"SceneId"`
}

StartSceneRequest is the request struct for api StartScene

func CreateStartSceneRequest

func CreateStartSceneRequest() (request *StartSceneRequest)

CreateStartSceneRequest creates a request to invoke StartScene API

type StartSceneResponse

type StartSceneResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
	Code      string `json:"Code" xml:"Code"`
	Message   string `json:"Message" xml:"Message"`
	Success   bool   `json:"Success" xml:"Success"`
	ReportId  int64  `json:"ReportId" xml:"ReportId"`
}

StartSceneResponse is the response struct for api StartScene

func CreateStartSceneResponse

func CreateStartSceneResponse() (response *StartSceneResponse)

CreateStartSceneResponse creates a response to parse from StartScene response

Jump to

Keyboard shortcuts

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