Documentation ¶
Index ¶
- Variables
- type BuddyKey
- func (b *BuddyKey) AddUsed(n int)
- func (b *BuddyKey) GetNextReset() time.Time
- func (b *BuddyKey) GetRPM() int
- func (b *BuddyKey) GetUsed() int
- func (b *BuddyKey) IsExpired() bool
- func (b *BuddyKey) IsInvalid() bool
- func (b *BuddyKey) ResetUsed()
- func (b *BuddyKey) SetExpired(v bool)
- func (b *BuddyKey) SetInvalid(v bool)
- func (b *BuddyKey) SetNextReset(t time.Time)
- func (b *BuddyKey) SetRPM(n int)
- type HashRequest
- type HashResponse
- type Provider
- func (p *Provider) AddKey(key string) error
- func (p *Provider) ApiURL() string
- func (p *Provider) DelKey(key string) error
- func (p *Provider) GetAvailableKey() (*BuddyKey, error)
- func (p *Provider) GetKeys() []interface{}
- func (p *Provider) Hash(authTicket, sessionData []byte, latitude, longitude, accuracy float64, ...) (uint32, uint32, []uint64, error)
- func (p *Provider) SetDebug(d bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToRequest = errors.New("Failed to request hash server") ErrKeyPassedLimit = errors.New("Key passed the limit") ErrBadRequest = errors.New("Something wrong in the request") ErrInvalidKey = errors.New("Invalid or expired key") ErrNoAvailableKey = errors.New("No hash key is available") )
View Source
var (
Debug bool
)
Functions ¶
This section is empty.
Types ¶
type BuddyKey ¶
type BuddyKey struct { Key string RPM int Used int NextReset time.Time Invalid bool Expired bool sync.RWMutex }
func (*BuddyKey) GetNextReset ¶
func (*BuddyKey) SetExpired ¶
func (*BuddyKey) SetInvalid ¶
func (*BuddyKey) SetNextReset ¶
type HashRequest ¶
type HashResponse ¶
Click to show internal directories.
Click to hide internal directories.