highbrow

package module
v0.0.0-...-88261ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2016 License: GPL-3.0 Imports: 2 Imported by: 5

README

highbrow

Expose tools for Intelligent (enough) Rate limiting, Throttling & Retries for your Network operations.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Try

func Try(times int, fn func() error) error

Types

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func MakePool

func MakePool(size int, fn func(int)) *Pool

func (*Pool) Init

func (self *Pool) Init()

func (*Pool) Wait

func (self *Pool) Wait()

type RateLimiter

type RateLimiter struct {
	// contains filtered or unexported fields
}

func NewLimiter

func NewLimiter(rate int) *RateLimiter

func (*RateLimiter) SetBurst

func (self *RateLimiter) SetBurst(burst int) *RateLimiter

func (*RateLimiter) SetRate

func (self *RateLimiter) SetRate(rate int) *RateLimiter

func (*RateLimiter) Start

func (self *RateLimiter) Start() <-chan time.Time

func (*RateLimiter) Stop

func (self *RateLimiter) Stop()

type RetryError

type RetryError struct {
	// contains filtered or unexported fields
}

func (*RetryError) Error

func (e *RetryError) Error() string

func (*RetryError) Errors

func (e *RetryError) Errors() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL