Documentation ¶
Index ¶
- Constants
- Variables
- func AutoResendRecords(dis *Client)
- func AutoResendRecordsTimeTask(dis *Client)
- func ReadLine(filePth string, lineIndex int64) ([]byte, error)
- func SetAuthentication(auth string)
- func SetCaCertificate(isCrt bool, crtPath string) error
- func SetReconnectNum(num uint)
- func SetRegion(reg string)
- func SetTimeOut(connectTime, responseTime uint)
- type Client
- func (client *Client) CommitCheckpoint(input *models.CommitCheckpointRequest) (*models.Result, *models.CommitCheckpointResult)
- func (client *Client) CreateApp(appName string) *models.Result
- func (client *Client) CreateStream(input *models.CreateStreamRequest) (*models.Result, *models.CreateStreamResult)
- func (client *Client) CreateTransferTask(input *models.CreateTransferTaskRequest) (*models.Result, *models.CreateTransferTaskResult)
- func (client *Client) DeleteApp(appName string) *models.Result
- func (client *Client) DeleteCheckpoint(input *models.DeleteCheckpointRequest) (*models.Result, *models.DeleteCheckpointResult)
- func (client *Client) DeleteStream(input *models.DeleteStreamRequest) (*models.Result, *models.DeleteStreamResult)
- func (client *Client) DeleteTransferTask(input *models.DeleteTransferTaskRequest) (*models.Result, *models.DeleteTransferTaskResult)
- func (client *Client) DescApp(appName string) (*models.Result, *models.DescribeAppResult)
- func (client *Client) DescStream(input *models.DescribeStreamRequest) (*models.Result, *models.DescribeStreamResult)
- func (client *Client) DescTransferTask(input *models.DescribeTransferTaskRequest) (*models.Result, *models.DescribeTransferTaskResult)
- func (client *Client) GetCheckpoint(input *models.GetCheckpointRequest) (*models.Result, *models.GetCheckpointResult)
- func (client *Client) GetPartitionCursor(input *models.GetPartitionCursorRequest) (*models.Result, *models.GetPartitionCursorResult)
- func (client *Client) GetRecords(input *models.GetRecordsRequest) (*models.Result, *models.GetRecordsResult)
- func (client *Client) ListApps(input *models.ListAppsRequest) (*models.Result, *models.ListAppsResult)
- func (client *Client) ListStreams(input *models.ListStreamsRequest) (*models.Result, *models.ListStreamsResult)
- func (client *Client) ListTransferTasks(input *models.ListTransferTasksRquest) (*models.Result, *models.ListTransferTasksResult)
- func (client *Client) PutRecords(input *models.PutRecordsRequest) (*models.Result, *models.PutRecordsResult)
- func (client *Client) PutRecordsXtoken(input *models.PutRecordsRequest, token string) (*models.Result, *models.PutRecordsResult)
- func (client *Client) UpdatePartitionCount(input *models.UpdatePartitionCountRequest) (*models.Result, *models.UpdatePartitionCountResult)
Constants ¶
const ( PUT = "PUT" POST = "POST" DELETE = "DELETE" GET = "GET" HEAD = "HEAD" )
Variables ¶
var CACHE_ARCHIVE_DATA_FILE_SUFFIX = ".data"
缓存归档数据文件后缀
var CACHE_ARCHIVE_INDEX_FILE_SUFFIX = ".index"
缓存归档索引文件后缀
var PROPERTY_DATA_CACHE_DIR string
Functions ¶
func AutoResendRecords ¶
func AutoResendRecords(dis *Client)
func AutoResendRecordsTimeTask ¶
func AutoResendRecordsTimeTask(dis *Client)
func SetAuthentication ¶
func SetAuthentication(auth string)
* *函数原型:func SetAuthentication(auth string) *函数功能:设置鉴权方式 *参数说明:authType鉴权类型 *返回值:无
func SetCaCertificate ¶
* *函数说明:设置https证书验证 *入参:isCrt 是否验证证书,false:不验证,true:验证 * crtPath 证书路径,当isCrt为true是有效 *返回值:错误信息
func SetRegion ¶
func SetRegion(reg string)
* *函数原型:func SetRegion(reg string) *函数功能:设置鉴权方式 *参数说明:authType鉴权类型 *返回值:无
func SetTimeOut ¶
func SetTimeOut(connectTime, responseTime uint)
* *函数原型:func SetTimeOut(connectTime,responseTime uint) *函数功能:设置网络超时 *参数说明:connectTime: 连接超时(秒),responseTime:响应超时 *返回值:
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func Factory ¶
* *函数原型:func Factory(ak, sk, endpoint string, pathStyle bool) *Client *函数功能:初始化Client类实例 *参数说明:AK:用户的AccessKeyID * SK:用户的SecretAccessKeyID * Endpoint:服务器地址,如(https://129.7.182.2:443) * PathStyle:请求方式是否为绝对路径方式,取值True 或 False *返回值:Client实例化对象
func FactoryEx ¶
func FactoryEx(disConf *models.DISClientConf) *Client
* *函数原型:func FactoryEx(ak, sk, reg, auth, endpoint string, pathStyle bool) *Client *函数功能:初始化Client类实例 *参数说明:ak:用户的AccessKeyID * sk:用户的SecretAccessKeyID * reg:V4鉴权使用的region * auth:鉴权方式 * endpoint:服务器地址,如(https://129.7.182.2:443) * pathStyle:请求方式是否为绝对路径方式,取值True 或 False *返回值:Client实例化对象
func (*Client) CommitCheckpoint ¶
func (client *Client) CommitCheckpoint(input *models.CommitCheckpointRequest) (*models.Result, *models.CommitCheckpointResult)
* *函数原型:func (client *Client) CommitCheckpoint(input *models.CommitCheckpointRequest) (*models.Result, *models.CommitCheckpointResult) *函数功能:提交checkpoint *参数说明: *返回值:result: Result对象实例
func (*Client) CreateApp ¶
* *函数原型:func (client *Client) CreateApp(appName string) *models.Result *函数功能:创建APP *参数说明: *返回值:result: Result对象实例
func (*Client) CreateStream ¶
func (client *Client) CreateStream(input *models.CreateStreamRequest) (*models.Result, *models.CreateStreamResult)
* *函数原型:func (client *Client) CreateStream(input *models.CreateStreamRequest) (*models.Result, *models.CreateStreamResult) *函数功能:创建通道 *参数说明: *返回值:result: Result对象实例
func (*Client) CreateTransferTask ¶
func (client *Client) CreateTransferTask(input *models.CreateTransferTaskRequest) (*models.Result, *models.CreateTransferTaskResult)
* *函数原型:func (client *Client) CreateTransferTask(input *models.CreateTransferTaskRequest) (*models.Result, *models.CreateTransferTaskResult) *函数功能:创建转储任务 *参数说明: *返回值:result: Result对象实例
func (*Client) DeleteApp ¶
* *函数原型:func (client *Client) DeleteApp(appName string) *models.Result *函数功能:删除APP *参数说明: *返回值:result: Result对象实例
func (*Client) DeleteCheckpoint ¶
func (client *Client) DeleteCheckpoint(input *models.DeleteCheckpointRequest) (*models.Result, *models.DeleteCheckpointResult)
* *函数原型:func (client *Client) DeleteCheckpointResult(input *models.DeleteCheckpointRequest) *函数功能:获取checkpoint *参数说明: *返回值:result: Result对象实例
func (*Client) DeleteStream ¶
func (client *Client) DeleteStream(input *models.DeleteStreamRequest) (*models.Result, *models.DeleteStreamResult)
* *函数原型:func (client *Client) DeleteStream(input *models.DeleteStreamRequest) *函数功能:删除通道 *参数说明: *返回值:result: Result对象实例
func (*Client) DeleteTransferTask ¶
func (client *Client) DeleteTransferTask(input *models.DeleteTransferTaskRequest) (*models.Result, *models.DeleteTransferTaskResult)
* *函数原型:func (client *Client) DeleteTransferTask(input *models.DeleteTransferTaskRequest) *函数功能:获取checkpoint *参数说明: *返回值:result: Result对象实例
func (*Client) DescApp ¶
* *函数原型:func (client *Client) DescApp(appName string) (*models.Result, *models.DescribeAppResult) *函数功能:描述APP详情 *参数说明: *返回值:result: Result对象实例
func (*Client) DescStream ¶
func (client *Client) DescStream(input *models.DescribeStreamRequest) (*models.Result, *models.DescribeStreamResult)
* *函数原型:func (client *Client) DescStream(input *models.DescribeStreamRequest) (*models.Result, *models.DescribeStreamResult) *函数功能:描述通道详情 *参数说明: *返回值:result: Result对象实例
func (*Client) DescTransferTask ¶
func (client *Client) DescTransferTask(input *models.DescribeTransferTaskRequest) (*models.Result, *models.DescribeTransferTaskResult)
* *函数原型:func (client *Client) DescTransferTask(input *models.DescribeTransferTaskRequest) *函数功能:查询通道下的转储任务详情 *参数说明: *返回值:result: Result对象实例
func (*Client) GetCheckpoint ¶
func (client *Client) GetCheckpoint(input *models.GetCheckpointRequest) (*models.Result, *models.GetCheckpointResult)
* *函数原型:func (client *Client) GetCheckpoint(input *models.GetCheckpointRequest) (*models.Result, *models.GetCheckpointResult) *函数功能:获取checkpoint *参数说明: *返回值:result: Result对象实例
func (*Client) GetPartitionCursor ¶
func (client *Client) GetPartitionCursor(input *models.GetPartitionCursorRequest) (*models.Result, *models.GetPartitionCursorResult)
* *函数原型:func (client *Client) GetPartitionCursor(input *models.GetPartitionCursorRequest) (*models.Result, *models.GetPartitionCursorResult) *函数功能:用户获取迭代器,根据迭代器获取一次数据和下一个迭代器。 *参数说明:GetPartitionCursorRequest 用户获取迭代器的请求参数 *返回值:获取迭代器的响应结果
func (*Client) GetRecords ¶
func (client *Client) GetRecords(input *models.GetRecordsRequest) (*models.Result, *models.GetRecordsResult)
* *函数原型:func (client *Client) GetRecords(input *models.GetRecordsRequest) (*models.Result, *models.GetRecordsResult) *函数功能:从DIS实例中下载数据。 *参数说明:GetRecordsRequest 用户获取数据的请求参数 *返回值:获取数据的响应结果
func (*Client) ListApps ¶
func (client *Client) ListApps(input *models.ListAppsRequest) (*models.Result, *models.ListAppsResult)
* *函数原型:func (client *Client) ListApps(input *models.ListAppsRequest) (*models.Result, *models.DescribeAppResult) *函数功能:查询APP列表 *参数说明: *返回值:result: Result对象实例
func (*Client) ListStreams ¶
func (client *Client) ListStreams(input *models.ListStreamsRequest) (*models.Result, *models.ListStreamsResult)
* *函数原型:func (client *Client) ListStreams(input *models.ListStreamsRequest) *函数功能:获取流列表 *参数说明: *返回值:result: Result对象实例
func (*Client) ListTransferTasks ¶
func (client *Client) ListTransferTasks(input *models.ListTransferTasksRquest) (*models.Result, *models.ListTransferTasksResult)
* *函数原型:func (client *Client) ListTransferTasks(input *models.ListTransferTasksRquest) *函数功能:查询通道下的转储任务列表 *参数说明: *返回值:result: Result对象实例
func (*Client) PutRecords ¶
func (client *Client) PutRecords(input *models.PutRecordsRequest) (*models.Result, *models.PutRecordsResult)
* *函数原型:func (client *Client) PutRecords(input *models.PutRecordsRequest) (*models.Result, *models.PutRecordsResult) *函数功能:从DIS实例中下载数据。 *参数说明:GetRecordsRequest 用户上传数据的请求参数 *返回值:上传数据的响应结果
func (*Client) PutRecordsXtoken ¶
func (client *Client) PutRecordsXtoken(input *models.PutRecordsRequest, token string) (*models.Result, *models.PutRecordsResult)
func (*Client) UpdatePartitionCount ¶
func (client *Client) UpdatePartitionCount(input *models.UpdatePartitionCountRequest) (*models.Result, *models.UpdatePartitionCountResult)
* *函数原型:func (client *Client) UpdatePartitionCount(input *models.UpdatePartitionCountRequest) *函数功能:扩缩容通道 *参数说明: *返回值:result: Result对象实例