Documentation ¶
Index ¶
- Variables
- type Client
- func NewClient() (client *Client, err error)
- func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error)
- func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error)
- func NewClientWithOptions(regionId string, config *Config, credential auth.Credential) (client *Client, err error)
- func NewClientWithProvider(regionId string, providers ...provider.Provider) (client *Client, err error)
- func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)
- func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error)
- func NewClientWithStsRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error)deprecated
- func NewClientWithStsRoleNameOnEcs(regionId string, roleName string) (client *Client, err error)deprecated
- func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error)
- func (client *Client) AddAsyncTask(task func()) (err error)
- func (client *Client) BuildRequestWithSigner(request requests.AcsRequest, signer auth.Signer) (err error)
- func (client *Client) DoAction(request requests.AcsRequest, response responses.AcsResponse) (err error)
- func (client *Client) DoActionWithSigner(request requests.AcsRequest, response responses.AcsResponse, ...) (err error)
- func (client *Client) EnableAsync(routinePoolSize, maxTaskQueueSize int)
- func (client *Client) GetConfig() *Config
- func (client *Client) Init() (err error)
- func (client *Client) InitClientConfig() (config *Config)
- func (client *Client) InitWithAccessKey(regionId, accessKeyId, accessKeySecret string) (err error)
- func (client *Client) InitWithEcsRamRole(regionId, roleName string) (err error)
- func (client *Client) InitWithOptions(regionId string, config *Config, credential auth.Credential) (err error)
- func (client *Client) InitWithProviderChain(regionId string, provider provider.Provider) (err error)
- func (client *Client) InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (err error)
- func (client *Client) InitWithRamRoleArnAndPolicy(...) (err error)
- func (client *Client) InitWithRsaKeyPair(regionId, publicKeyId, privateKey string, sessionExpiration int) (err error)
- func (client *Client) InitWithStsToken(regionId, accessKeyId, accessKeySecret, securityToken string) (err error)
- func (client *Client) ProcessCommonRequest(request *requests.CommonRequest) (response *responses.CommonResponse, err error)
- func (client *Client) ProcessCommonRequestWithSigner(request *requests.CommonRequest, signerInterface interface{}) (response *responses.CommonResponse, err error)
- func (client *Client) SetEndpoint(ep string)
- func (client *Client) SetHTTPDoHook(hook HTTPDoHook)
- func (client *Client) Shutdown()
- type Config
- func (c *Config) WithAutoRetry(isAutoRetry bool) *Config
- func (c *Config) WithDebug(isDebug bool) *Config
- func (c *Config) WithEnableAsync(isEnableAsync bool) *Config
- func (c *Config) WithGoRoutinePoolSize(goRoutinePoolSize int) *Config
- func (c *Config) WithHttpTransport(httpTransport *http.Transport) *Config
- func (c *Config) WithMaxRetryTime(maxRetryTime int) *Config
- func (c *Config) WithMaxTaskQueueSize(maxTaskQueueSize int) *Config
- func (c *Config) WithScheme(scheme string) *Config
- func (c *Config) WithTimeout(timeout time.Duration) *Config
- func (c *Config) WithUserAgent(userAgent string) *Config
- type HTTPDoHook
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "0.0.1"
Version this value will be replaced while build: -ldflags="-X sdk.version=x.x.x"
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client the type Client
func NewClientWithAccessKey ¶
func NewClientWithEcsRamRole ¶
func NewClientWithOptions ¶
func NewClientWithProvider ¶
func NewClientWithRamRoleArn ¶
func NewClientWithRsaKeyPair ¶
func NewClientWithStsRoleArn
deprecated
func NewClientWithStsRoleNameOnEcs
deprecated
func NewClientWithStsToken ¶
func (*Client) AddAsyncTask ¶
* only block when any one of the following occurs: 1. the asyncTaskQueue is full, increase the queue size to avoid this 2. Shutdown() in progressing, the client is being closed *
func (*Client) BuildRequestWithSigner ¶
func (*Client) DoAction ¶
func (client *Client) DoAction(request requests.AcsRequest, response responses.AcsResponse) (err error)
func (*Client) DoActionWithSigner ¶
func (client *Client) DoActionWithSigner(request requests.AcsRequest, response responses.AcsResponse, signer auth.Signer) (err error)
func (*Client) EnableAsync ¶
EnableAsync enable the async task queue
func (*Client) InitClientConfig ¶
func (*Client) InitWithAccessKey ¶
func (*Client) InitWithEcsRamRole ¶
func (*Client) InitWithOptions ¶
func (*Client) InitWithProviderChain ¶
func (client *Client) InitWithProviderChain(regionId string, provider provider.Provider) (err error)
InitWithProviderChain will get credential from the providerChain, the RsaKeyPairCredential Only applicable to regionID `ap-northeast-1`, if your providerChain may return a credential type with RsaKeyPairCredential, please ensure your regionID is `ap-northeast-1`.
func (*Client) InitWithRamRoleArn ¶
func (*Client) InitWithRamRoleArnAndPolicy ¶
func (*Client) InitWithRsaKeyPair ¶
func (*Client) InitWithStsToken ¶
func (*Client) ProcessCommonRequest ¶
func (client *Client) ProcessCommonRequest(request *requests.CommonRequest) (response *responses.CommonResponse, err error)
func (*Client) ProcessCommonRequestWithSigner ¶
func (client *Client) ProcessCommonRequestWithSigner(request *requests.CommonRequest, signerInterface interface{}) (response *responses.CommonResponse, err error)
func (*Client) SetHTTPDoHook ¶
func (client *Client) SetHTTPDoHook(hook HTTPDoHook)
SetHTTPDoHook ...
type Config ¶
type Config struct { AutoRetry bool `default:"true"` MaxRetryTime int `default:"3"` UserAgent string `default:""` Debug bool `default:"false"` Timeout time.Duration `default:"10000000000"` HttpTransport *http.Transport `default:""` EnableAsync bool `default:"false"` MaxTaskQueueSize int `default:"1000"` GoRoutinePoolSize int `default:"5"` Scheme string `default:"HTTP"` }
func (*Config) WithAutoRetry ¶
func (*Config) WithEnableAsync ¶
func (*Config) WithGoRoutinePoolSize ¶
func (*Config) WithHttpTransport ¶
func (*Config) WithMaxRetryTime ¶
func (*Config) WithMaxTaskQueueSize ¶
func (*Config) WithScheme ¶
func (*Config) WithUserAgent ¶
Directories ¶
Path | Synopsis |
---|---|
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
|
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. |
Click to show internal directories.
Click to hide internal directories.