Documentation ¶
Index ¶
- Constants
- func AsyncExecute(runnable func())
- func IsNetError(err error) bool
- func IsTimeoutError(err error) bool
- func ReportRequestError(metricsPrefix, url string, begin time.Time, code int, message string)
- func ReportRequestException(metricsPrefix, url string, begin time.Time, err error)
- func ReportRequestSuccess(metricsPrefix, url string, begin time.Time)
- func VolcSign(req *fasthttp.Request, cred Credential) *fasthttp.Request
- type Context
- func (receiver *Context) AK() string
- func (receiver *Context) CustomerHeaders() map[string]string
- func (receiver *Context) HostHeader() string
- func (receiver *Context) Hosts() []string
- func (receiver *Context) SK() string
- func (receiver *Context) Schema() string
- func (receiver *Context) Tenant() string
- func (receiver *Context) TenantId() string
- func (receiver *Context) Token() string
- func (receiver *Context) UseAirAuth() bool
- func (receiver *Context) UseVolcAuth() bool
- type ContextParam
- type Credential
- type HTTPCaller
- type HostAvailabler
- type Region
- type URLCenter
Constants ¶
View Source
const ( MaxWriteItemCount = 2000 MaxImportItemCount = 10000 // StatusCodeSuccess The request was executed successfully without any exception StatusCodeSuccess = 0 // StatusCodeIdempotent A Request with the same "Request-ID" was already received. This Request was rejected StatusCodeIdempotent = 409 // StatusCodeOperationLoss Operation information is missing due to an unknown exception StatusCodeOperationLoss = 410 // StatusCodeTooManyRequest The server hope slow down request frequency, and this request was rejected StatusCodeTooManyRequest = 429 )
Variables ¶
This section is empty.
Functions ¶
func AsyncExecute ¶
func AsyncExecute(runnable func())
func IsNetError ¶
func IsTimeoutError ¶
func ReportRequestError ¶ added in v0.1.11
func ReportRequestException ¶ added in v0.1.11
func ReportRequestSuccess ¶ added in v0.1.11
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext(param *ContextParam) (*Context, error)
func (*Context) CustomerHeaders ¶
func (*Context) HostHeader ¶
func (*Context) UseAirAuth ¶
func (*Context) UseVolcAuth ¶
type ContextParam ¶
type Credential ¶
type HTTPCaller ¶ added in v0.1.10
type HTTPCaller struct {
// contains filtered or unexported fields
}
func NewHTTPCaller ¶ added in v0.1.10
func NewHTTPCaller(context *Context) *HTTPCaller
func (*HTTPCaller) DoJSONRequest ¶ added in v0.1.10
type HostAvailabler ¶
type HostAvailabler struct {
// contains filtered or unexported fields
}
func NewHostAvailabler ¶
func NewHostAvailabler(urlCenter URLCenter, context *Context) *HostAvailabler
func (*HostAvailabler) Shutdown ¶
func (receiver *HostAvailabler) Shutdown()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.