v20191118

package
v3.0.203+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const APIVersion = "2019-11-18"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(credential *common.Credential, region string, clientProfile *profile.ClientProfile) (client *Client, err error)

func NewClientWithSecretId

func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error)

Deprecated

func (*Client) CreateSession

func (c *Client) CreateSession(request *CreateSessionRequest) (response *CreateSessionResponse, err error)

创建会话

func (*Client) DescribeWorkers

func (c *Client) DescribeWorkers(request *DescribeWorkersRequest) (response *DescribeWorkersResponse, err error)

查询空闲机器数量

func (*Client) DescribeWorkersInfo

func (c *Client) DescribeWorkersInfo(request *DescribeWorkersInfoRequest) (response *DescribeWorkersInfoResponse, err error)

获取机器信息

func (*Client) EnterQueue

func (c *Client) EnterQueue(request *EnterQueueRequest) (response *EnterQueueResponse, err error)

进入排队锁定机器

func (*Client) ModifyWorkers

func (c *Client) ModifyWorkers(request *ModifyWorkersRequest) (response *ModifyWorkersResponse, err error)

修改机器信息

func (*Client) QuitQueue

func (c *Client) QuitQueue(request *QuitQueueRequest) (response *QuitQueueResponse, err error)

退出排队

func (*Client) StopGame

func (c *Client) StopGame(request *StopGameRequest) (response *StopGameResponse, err error)

强制退出游戏

func (*Client) TrylockWorker

func (c *Client) TrylockWorker(request *TrylockWorkerRequest) (response *TrylockWorkerResponse, err error)

尝试锁定机器

type CreateSessionRequest

type CreateSessionRequest struct {
	*tchttp.BaseRequest

	// 客户端session信息,从JSSDK请求中获得
	ClientSession *string `json:"ClientSession,omitempty" name:"ClientSession"`

	// 游戏用户ID
	UserId *string `json:"UserId,omitempty" name:"UserId"`

	// 游戏ID
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 游戏区域,ap-guangzhou、ap-shanghai、ap-beijing等
	GameRegion *string `json:"GameRegion,omitempty" name:"GameRegion"`

	// 游戏参数
	GameParas *string `json:"GameParas,omitempty" name:"GameParas"`

	// 分辨率,,可设置为1080p或720p
	Resolution *string `json:"Resolution,omitempty" name:"Resolution"`

	// 背景图url,格式为png或jpeg,宽高1920*1080
	ImageUrl *string `json:"ImageUrl,omitempty" name:"ImageUrl"`

	// 资源池编号,1表示正式,2表示测试
	SetNo *uint64 `json:"SetNo,omitempty" name:"SetNo"`

	// 单位Mbps,固定码率,后端不动态调整(MaxBitrate和MinBitrate将无效)
	Bitrate *uint64 `json:"Bitrate,omitempty" name:"Bitrate"`

	// 单位Mbps,动态调整最大码率
	MaxBitrate *uint64 `json:"MaxBitrate,omitempty" name:"MaxBitrate"`

	// 单位Mbps,动态调整最小码率
	MinBitrate *uint64 `json:"MinBitrate,omitempty" name:"MinBitrate"`

	// 帧率,可设置为30、45或60
	Fps *uint64 `json:"Fps,omitempty" name:"Fps"`

	// 游戏用户IP,用于就近调度,例如125.127.178.228
	UserIp *string `json:"UserIp,omitempty" name:"UserIp"`

	// 优化项,便于客户灰度开启新的优化项,默认为0
	Optimization *uint64 `json:"Optimization,omitempty" name:"Optimization"`
}

func NewCreateSessionRequest

func NewCreateSessionRequest() (request *CreateSessionRequest)

func (*CreateSessionRequest) FromJsonString

func (r *CreateSessionRequest) FromJsonString(s string) error

func (*CreateSessionRequest) ToJsonString

func (r *CreateSessionRequest) ToJsonString() string

type CreateSessionResponse

type CreateSessionResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 服务端session信息,返回给JSSDK
		ServerSession *string `json:"ServerSession,omitempty" name:"ServerSession"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewCreateSessionResponse

func NewCreateSessionResponse() (response *CreateSessionResponse)

func (*CreateSessionResponse) FromJsonString

func (r *CreateSessionResponse) FromJsonString(s string) error

func (*CreateSessionResponse) ToJsonString

func (r *CreateSessionResponse) ToJsonString() string

type DescribeWorkersInfoRequest

type DescribeWorkersInfoRequest struct {
	*tchttp.BaseRequest
}

func NewDescribeWorkersInfoRequest

func NewDescribeWorkersInfoRequest() (request *DescribeWorkersInfoRequest)

func (*DescribeWorkersInfoRequest) FromJsonString

func (r *DescribeWorkersInfoRequest) FromJsonString(s string) error

func (*DescribeWorkersInfoRequest) ToJsonString

func (r *DescribeWorkersInfoRequest) ToJsonString() string

type DescribeWorkersInfoResponse

type DescribeWorkersInfoResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 机器数量
		WorkerNum *uint64 `json:"WorkerNum,omitempty" name:"WorkerNum"`

		// 机器详细信息
		WorkerDetail []*WorkerDetail `json:"WorkerDetail,omitempty" name:"WorkerDetail" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeWorkersInfoResponse

func NewDescribeWorkersInfoResponse() (response *DescribeWorkersInfoResponse)

func (*DescribeWorkersInfoResponse) FromJsonString

func (r *DescribeWorkersInfoResponse) FromJsonString(s string) error

func (*DescribeWorkersInfoResponse) ToJsonString

func (r *DescribeWorkersInfoResponse) ToJsonString() string

type DescribeWorkersRequest

type DescribeWorkersRequest struct {
	*tchttp.BaseRequest

	// 资源池编号,1表示正式,2表示测试
	SetNo *uint64 `json:"SetNo,omitempty" name:"SetNo"`
}

func NewDescribeWorkersRequest

func NewDescribeWorkersRequest() (request *DescribeWorkersRequest)

func (*DescribeWorkersRequest) FromJsonString

func (r *DescribeWorkersRequest) FromJsonString(s string) error

func (*DescribeWorkersRequest) ToJsonString

func (r *DescribeWorkersRequest) ToJsonString() string

type DescribeWorkersResponse

type DescribeWorkersResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 空闲机器总数量
		Idle *uint64 `json:"Idle,omitempty" name:"Idle"`

		// 区域个数
		RegionNum *uint64 `json:"RegionNum,omitempty" name:"RegionNum"`

		// 各个区域的机器情况
		RegionDetail []*WorkerRegionInfo `json:"RegionDetail,omitempty" name:"RegionDetail" list`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewDescribeWorkersResponse

func NewDescribeWorkersResponse() (response *DescribeWorkersResponse)

func (*DescribeWorkersResponse) FromJsonString

func (r *DescribeWorkersResponse) FromJsonString(s string) error

func (*DescribeWorkersResponse) ToJsonString

func (r *DescribeWorkersResponse) ToJsonString() string

type EnterQueueRequest

type EnterQueueRequest struct {
	*tchttp.BaseRequest

	// true:第一次请求排队 false:已在排队中,查询当前排名
	First *bool `json:"First,omitempty" name:"First"`

	// 游戏ID
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 用户ID
	UserId *string `json:"UserId,omitempty" name:"UserId"`

	// 资源池编号
	SetNumber *uint64 `json:"SetNumber,omitempty" name:"SetNumber"`

	// 游戏用户IP,用于就近调度,例如125.127.178.228
	UserIp *string `json:"UserIp,omitempty" name:"UserIp"`
}

func NewEnterQueueRequest

func NewEnterQueueRequest() (request *EnterQueueRequest)

func (*EnterQueueRequest) FromJsonString

func (r *EnterQueueRequest) FromJsonString(s string) error

func (*EnterQueueRequest) ToJsonString

func (r *EnterQueueRequest) ToJsonString() string

type EnterQueueResponse

type EnterQueueResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 排名
		Rank *uint64 `json:"Rank,omitempty" name:"Rank"`

		// 机器锁定成功
		LockSuccess *bool `json:"LockSuccess,omitempty" name:"LockSuccess"`

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewEnterQueueResponse

func NewEnterQueueResponse() (response *EnterQueueResponse)

func (*EnterQueueResponse) FromJsonString

func (r *EnterQueueResponse) FromJsonString(s string) error

func (*EnterQueueResponse) ToJsonString

func (r *EnterQueueResponse) ToJsonString() string

type ModifyWorkersRequest

type ModifyWorkersRequest struct {
	*tchttp.BaseRequest

	// 批量机器ID,最多不超过100个
	InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds" list`

	// 资源池编号,修改有效范围为[1,100],在idle状态下才能修改成功
	SetNo *uint64 `json:"SetNo,omitempty" name:"SetNo"`
}

func NewModifyWorkersRequest

func NewModifyWorkersRequest() (request *ModifyWorkersRequest)

func (*ModifyWorkersRequest) FromJsonString

func (r *ModifyWorkersRequest) FromJsonString(s string) error

func (*ModifyWorkersRequest) ToJsonString

func (r *ModifyWorkersRequest) ToJsonString() string

type ModifyWorkersResponse

type ModifyWorkersResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewModifyWorkersResponse

func NewModifyWorkersResponse() (response *ModifyWorkersResponse)

func (*ModifyWorkersResponse) FromJsonString

func (r *ModifyWorkersResponse) FromJsonString(s string) error

func (*ModifyWorkersResponse) ToJsonString

func (r *ModifyWorkersResponse) ToJsonString() string

type QuitQueueRequest

type QuitQueueRequest struct {
	*tchttp.BaseRequest

	// 用户ID
	UserId *string `json:"UserId,omitempty" name:"UserId"`

	// 资源池编号
	SetNumber *uint64 `json:"SetNumber,omitempty" name:"SetNumber"`
}

func NewQuitQueueRequest

func NewQuitQueueRequest() (request *QuitQueueRequest)

func (*QuitQueueRequest) FromJsonString

func (r *QuitQueueRequest) FromJsonString(s string) error

func (*QuitQueueRequest) ToJsonString

func (r *QuitQueueRequest) ToJsonString() string

type QuitQueueResponse

type QuitQueueResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewQuitQueueResponse

func NewQuitQueueResponse() (response *QuitQueueResponse)

func (*QuitQueueResponse) FromJsonString

func (r *QuitQueueResponse) FromJsonString(s string) error

func (*QuitQueueResponse) ToJsonString

func (r *QuitQueueResponse) ToJsonString() string

type StopGameRequest

type StopGameRequest struct {
	*tchttp.BaseRequest

	// 游戏用户ID
	UserId *string `json:"UserId,omitempty" name:"UserId"`
}

func NewStopGameRequest

func NewStopGameRequest() (request *StopGameRequest)

func (*StopGameRequest) FromJsonString

func (r *StopGameRequest) FromJsonString(s string) error

func (*StopGameRequest) ToJsonString

func (r *StopGameRequest) ToJsonString() string

type StopGameResponse

type StopGameResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewStopGameResponse

func NewStopGameResponse() (response *StopGameResponse)

func (*StopGameResponse) FromJsonString

func (r *StopGameResponse) FromJsonString(s string) error

func (*StopGameResponse) ToJsonString

func (r *StopGameResponse) ToJsonString() string

type TrylockWorkerRequest

type TrylockWorkerRequest struct {
	*tchttp.BaseRequest

	// 游戏用户ID
	UserId *string `json:"UserId,omitempty" name:"UserId"`

	// 游戏ID
	GameId *string `json:"GameId,omitempty" name:"GameId"`

	// 游戏区域,ap-guangzhou、ap-shanghai、ap-beijing等
	GameRegion *string `json:"GameRegion,omitempty" name:"GameRegion"`

	// 资源池编号,1表示共用,2表示测试
	SetNo *uint64 `json:"SetNo,omitempty" name:"SetNo"`

	// 游戏用户IP,用于就近调度,例如125.127.178.228
	UserIp *string `json:"UserIp,omitempty" name:"UserIp"`
}

func NewTrylockWorkerRequest

func NewTrylockWorkerRequest() (request *TrylockWorkerRequest)

func (*TrylockWorkerRequest) FromJsonString

func (r *TrylockWorkerRequest) FromJsonString(s string) error

func (*TrylockWorkerRequest) ToJsonString

func (r *TrylockWorkerRequest) ToJsonString() string

type TrylockWorkerResponse

type TrylockWorkerResponse struct {
	*tchttp.BaseResponse
	Response *struct {

		// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
		RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
	} `json:"Response"`
}

func NewTrylockWorkerResponse

func NewTrylockWorkerResponse() (response *TrylockWorkerResponse)

func (*TrylockWorkerResponse) FromJsonString

func (r *TrylockWorkerResponse) FromJsonString(s string) error

func (*TrylockWorkerResponse) ToJsonString

func (r *TrylockWorkerResponse) ToJsonString() string

type WorkerDetail

type WorkerDetail struct {

	// 客户appid
	AppId *uint64 `json:"AppId,omitempty" name:"AppId"`

	// 资源池编号
	SetNo *uint64 `json:"SetNo,omitempty" name:"SetNo"`

	// 机器所属区域
	Region *string `json:"Region,omitempty" name:"Region"`

	// 机器ID
	InstanceId *string `json:"InstanceId,omitempty" name:"InstanceId"`

	// 机器类型:
	// LARGE-大型
	// MEDIUM-中型
	// SMALL-小型
	InstanceType *string `json:"InstanceType,omitempty" name:"InstanceType"`

	// 机器IP
	Ip *string `json:"Ip,omitempty" name:"Ip"`

	// 服务状态:
	// IDLE-空闲
	// LOCK-锁定
	// ESTABLISHED-游戏中
	// RECONNECT-等待重连
	// RECOVERY-清理恢复
	// FORBID-禁用
	// UNAVAILABLE-不可用
	ServiceState *string `json:"ServiceState,omitempty" name:"ServiceState"`

	// 用户ID
	// 注意:此字段可能返回 null,表示取不到有效值。
	UserId *string `json:"UserId,omitempty" name:"UserId"`

	// 游戏ID
	// 注意:此字段可能返回 null,表示取不到有效值。
	GameId *string `json:"GameId,omitempty" name:"GameId"`
}

type WorkerRegionInfo

type WorkerRegionInfo struct {

	// 区域
	Region *string `json:"Region,omitempty" name:"Region"`

	// 该区域空闲机器数量
	Idle *uint64 `json:"Idle,omitempty" name:"Idle"`
}

Jump to

Keyboard shortcuts

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