Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxBulkRequestsCount = 100 MaxCountPerBulkRequestItem = 100 )
View Source
const DefaultMaxFetchersCount = 1
View Source
const DefaultMaxRequestsCountPerSecond = 0
Variables ¶
This section is empty.
Functions ¶
func CeilDivisionInt ¶ added in v1.6.1
Types ¶
type Address ¶ added in v1.4.0
type Address struct {
AddressID int `json:"addressID"`
OwnerID int `json:"ownerID"`
TypeID interface{} `json:"typeID"`
Address2 string `json:"address2"`
Address string `json:"address"`
Street string `json:"street"`
PostalCode string `json:"postalCode"`
City string `json:"city"`
State string `json:"state"`
Country string `json:"country"`
}
Address from getAddresses
type DataProvider ¶ added in v1.6.1
type ItemsStream ¶ added in v1.6.1
type ItemsStream chan Item
type Lister ¶ added in v1.6.1
type Lister struct {
// contains filtered or unexported fields
}
func NewLister ¶ added in v1.6.1
func NewLister(settings ListingSettings, dataProvider DataProvider, sl Sleeper) *Lister
type ListingSettings ¶ added in v1.6.1
type ObjAttribute ¶ added in v1.4.0
type SleepThrottler ¶ added in v1.6.1
type SleepThrottler struct {
LimitPerSecond int
LastTimestamp int64
Count int
// contains filtered or unexported fields
}
SleepThrottler implements sleeping logic for requests throttling
func NewSleepThrottler ¶ added in v1.6.1
func NewSleepThrottler(limitPerSecond int, sl Sleeper) *SleepThrottler
NewSleepThrottler creates SleepThrottler
func (*SleepThrottler) Throttle ¶ added in v1.6.1
func (rt *SleepThrottler) Throttle()
Throttle implements throttling method
type Status ¶
type Status struct {
Request string `json:"request"`
RequestUnixTime int `json:"requestUnixTime"`
ResponseStatus string `json:"responseStatus"`
ErrorCode errors.ApiError `json:"errorCode"`
ErrorField string `json:"errorField"`
GenerationTime float64 `json:"generationTime"`
RecordsTotal int `json:"recordsTotal"`
RecordsInResponse int `json:"recordsInResponse"`
}
type StatusBulk ¶
type Throttler ¶ added in v1.6.1
type Throttler interface {
Throttle()
}
Throttler abstracts limiting of API requests
type ThrottlerMock ¶ added in v1.6.1
type ThrottlerMock struct {
WasTriggered bool
}
func (*ThrottlerMock) Throttle ¶ added in v1.6.1
func (tm *ThrottlerMock) Throttle()
Click to show internal directories.
Click to hide internal directories.