Documentation ¶
Overview ¶
Package eax queries the EA App API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAutoUpdateBackoff = errors.New("not updating eax client version due to backoff")
View Source
var ErrVersionRequired = errors.New("client version is required for this endpoint")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type PlayerID ¶
type PlayerID struct { PD uint64 // origin ID PSD uint64 // ? DisplayName string // in-game name Nickname string // social name? }
PlayerID contains basic identifiers and names for a player.
type UpdateMgr ¶
type UpdateMgr struct { // HTTP client to use. If not provided, [net/http.DefaultClient] will be // used. Client *http.Client // Timeout is the timeout for refreshing tokens. If zero, a reasonable // default is used. If negative, there is no timeout. Timeout time.Duration // Interval to update at. If zero, will not auto-update. AutoUpdateInterval time.Duration // Auto-update staged roll-out bucket. AutoUpdateBucket int // Auto-update backoff, if provided, checks if another auto-update is // allowed after a failure. If it returns false, ErrAutoUpdateBackoff will be // returned from the function triggering the auto-update. AutoUpdateBackoff func(err error, time time.Time, count int) bool // AutoUpdateHook is called for every auto-update attempt with the new (or // current if error) version, and any error which occurred. AutoUpdateHook func(v string, err error) // contains filtered or unexported fields }
UpdateMgr manages EAX client version information.
func (*UpdateMgr) SetVersion ¶
SetVersion sets the current version.
func (*UpdateMgr) Update ¶
Update gets the latest version, following u.AutoUpdateInterval if provided, unless the version is not set or force is true. If another update is in progress, it waits for the result of it. True is returned (on success or failure) if this call performed a update. This function may block for up to Timeout.
Click to show internal directories.
Click to hide internal directories.