Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound is for requests that 404'd from Blizzard's API. This happens periodically for valid requests.
Functions ¶
func Scan ¶
func Scan[T any](scanner *Scanner, requests <-chan bnet.Request, results chan<- ScanResult[T], options *ScanOptions[T])
Types ¶
type FuncResultProcessor ¶
func (FuncResultProcessor[T]) Process ¶
func (r FuncResultProcessor[T]) Process(t *T) error
type ResultProcessor ¶
func NewResultProcessor ¶
func NewResultProcessor[T any](f func(*T) error) ResultProcessor[T]
type ScanOptions ¶
type ScanOptions[T any] struct { Validator validate.Validator[T] Filters []ResultProcessor[T] Repairs []ResultProcessor[T] Lifespan time.Duration }
type ScanResult ¶
type ScanResult[T any] struct { Response T Error error ApiRequest bnet.Request Index int64 Details ScanResultDetails }
func ScanSingle ¶
func ScanSingle[T any](scanner *Scanner, request bnet.Request, options *ScanOptions[T]) ScanResult[T]
type ScanResultDetails ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner is a utility for querying and caching responses from the Blizzard API.
func NewScanner ¶
func NewScanner(storage storage.ResponseStorage, client *bnet.Client, opts ...ScannerOption) (*Scanner, error)
type ScannerOption ¶
type ScannerOption interface {
// contains filtered or unexported methods
}
func WithMaxRetries ¶
func WithMaxRetries(retries int) ScannerOption
func WithMetrics ¶
func WithMetrics(meter metric.Meter) ScannerOption
Click to show internal directories.
Click to hide internal directories.