generated

package
v0.0.0-...-d8ef1d0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllianceLoader

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

AllianceLoader batches and caches requests

func NewAllianceLoader

func NewAllianceLoader(config AllianceLoaderConfig) *AllianceLoader

NewAllianceLoader creates a new AllianceLoader given a fetch, wait, and maxBatch

func (*AllianceLoader) Clear

func (l *AllianceLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*AllianceLoader) Load

func (l *AllianceLoader) Load(key uint) (*athena.Alliance, error)

Load a Alliance by key, batching and caching will be applied automatically

func (*AllianceLoader) LoadAll

func (l *AllianceLoader) LoadAll(keys []uint) ([]*athena.Alliance, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*AllianceLoader) LoadAllThunk

func (l *AllianceLoader) LoadAllThunk(keys []uint) func() ([]*athena.Alliance, []error)

LoadAllThunk returns a function that when called will block waiting for a Alliances. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*AllianceLoader) LoadThunk

func (l *AllianceLoader) LoadThunk(key uint) func() (*athena.Alliance, error)

LoadThunk returns a function that when called will block waiting for a Alliance. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*AllianceLoader) Prime

func (l *AllianceLoader) Prime(key uint, value *athena.Alliance) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type AllianceLoaderConfig

type AllianceLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Alliance, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

AllianceLoaderConfig captures the config to create a new AllianceLoader

type AncestryLoader

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

AncestryLoader batches and caches requests

func NewAncestryLoader

func NewAncestryLoader(config AncestryLoaderConfig) *AncestryLoader

NewAncestryLoader creates a new AncestryLoader given a fetch, wait, and maxBatch

func (*AncestryLoader) Clear

func (l *AncestryLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*AncestryLoader) Load

func (l *AncestryLoader) Load(key uint) (*athena.Ancestry, error)

Load a Ancestry by key, batching and caching will be applied automatically

func (*AncestryLoader) LoadAll

func (l *AncestryLoader) LoadAll(keys []uint) ([]*athena.Ancestry, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*AncestryLoader) LoadAllThunk

func (l *AncestryLoader) LoadAllThunk(keys []uint) func() ([]*athena.Ancestry, []error)

LoadAllThunk returns a function that when called will block waiting for a Ancestrys. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*AncestryLoader) LoadThunk

func (l *AncestryLoader) LoadThunk(key uint) func() (*athena.Ancestry, error)

LoadThunk returns a function that when called will block waiting for a Ancestry. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*AncestryLoader) Prime

func (l *AncestryLoader) Prime(key uint, value *athena.Ancestry) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type AncestryLoaderConfig

type AncestryLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Ancestry, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

AncestryLoaderConfig captures the config to create a new AncestryLoader

type BloodlineLoader

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

BloodlineLoader batches and caches requests

func NewBloodlineLoader

func NewBloodlineLoader(config BloodlineLoaderConfig) *BloodlineLoader

NewBloodlineLoader creates a new BloodlineLoader given a fetch, wait, and maxBatch

func (*BloodlineLoader) Clear

func (l *BloodlineLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*BloodlineLoader) Load

func (l *BloodlineLoader) Load(key uint) (*athena.Bloodline, error)

Load a Bloodline by key, batching and caching will be applied automatically

func (*BloodlineLoader) LoadAll

func (l *BloodlineLoader) LoadAll(keys []uint) ([]*athena.Bloodline, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*BloodlineLoader) LoadAllThunk

func (l *BloodlineLoader) LoadAllThunk(keys []uint) func() ([]*athena.Bloodline, []error)

LoadAllThunk returns a function that when called will block waiting for a Bloodlines. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*BloodlineLoader) LoadThunk

func (l *BloodlineLoader) LoadThunk(key uint) func() (*athena.Bloodline, error)

LoadThunk returns a function that when called will block waiting for a Bloodline. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*BloodlineLoader) Prime

func (l *BloodlineLoader) Prime(key uint, value *athena.Bloodline) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type BloodlineLoaderConfig

type BloodlineLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Bloodline, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

BloodlineLoaderConfig captures the config to create a new BloodlineLoader

type CategoryLoader

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

CategoryLoader batches and caches requests

func NewCategoryLoader

func NewCategoryLoader(config CategoryLoaderConfig) *CategoryLoader

NewCategoryLoader creates a new CategoryLoader given a fetch, wait, and maxBatch

func (*CategoryLoader) Clear

func (l *CategoryLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*CategoryLoader) Load

func (l *CategoryLoader) Load(key uint) (*athena.Category, error)

Load a Category by key, batching and caching will be applied automatically

func (*CategoryLoader) LoadAll

func (l *CategoryLoader) LoadAll(keys []uint) ([]*athena.Category, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*CategoryLoader) LoadAllThunk

func (l *CategoryLoader) LoadAllThunk(keys []uint) func() ([]*athena.Category, []error)

LoadAllThunk returns a function that when called will block waiting for a Categorys. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CategoryLoader) LoadThunk

func (l *CategoryLoader) LoadThunk(key uint) func() (*athena.Category, error)

LoadThunk returns a function that when called will block waiting for a Category. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CategoryLoader) Prime

func (l *CategoryLoader) Prime(key uint, value *athena.Category) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type CategoryLoaderConfig

type CategoryLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Category, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

CategoryLoaderConfig captures the config to create a new CategoryLoader

type CharacterCorporationHistoryLoader

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

CharacterCorporationHistoryLoader batches and caches requests

func NewCharacterCorporationHistoryLoader

func NewCharacterCorporationHistoryLoader(config CharacterCorporationHistoryLoaderConfig) *CharacterCorporationHistoryLoader

NewCharacterCorporationHistoryLoader creates a new CharacterCorporationHistoryLoader given a fetch, wait, and maxBatch

func (*CharacterCorporationHistoryLoader) Clear

Clear the value at key from the cache, if it exists

func (*CharacterCorporationHistoryLoader) Load

Load a CharacterCorporationHistory by key, batching and caching will be applied automatically

func (*CharacterCorporationHistoryLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*CharacterCorporationHistoryLoader) LoadAllThunk

func (l *CharacterCorporationHistoryLoader) LoadAllThunk(keys []uint) func() ([][]*athena.CharacterCorporationHistory, []error)

LoadAllThunk returns a function that when called will block waiting for a CharacterCorporationHistorys. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CharacterCorporationHistoryLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a CharacterCorporationHistory. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CharacterCorporationHistoryLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type CharacterCorporationHistoryLoaderConfig

type CharacterCorporationHistoryLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([][]*athena.CharacterCorporationHistory, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

CharacterCorporationHistoryLoaderConfig captures the config to create a new CharacterCorporationHistoryLoader

type CharacterLoader

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

CharacterLoader batches and caches requests

func NewCharacterLoader

func NewCharacterLoader(config CharacterLoaderConfig) *CharacterLoader

NewCharacterLoader creates a new CharacterLoader given a fetch, wait, and maxBatch

func (*CharacterLoader) Clear

func (l *CharacterLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*CharacterLoader) Load

func (l *CharacterLoader) Load(key uint) (*athena.Character, error)

Load a Character by key, batching and caching will be applied automatically

func (*CharacterLoader) LoadAll

func (l *CharacterLoader) LoadAll(keys []uint) ([]*athena.Character, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*CharacterLoader) LoadAllThunk

func (l *CharacterLoader) LoadAllThunk(keys []uint) func() ([]*athena.Character, []error)

LoadAllThunk returns a function that when called will block waiting for a Characters. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CharacterLoader) LoadThunk

func (l *CharacterLoader) LoadThunk(key uint) func() (*athena.Character, error)

LoadThunk returns a function that when called will block waiting for a Character. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CharacterLoader) Prime

func (l *CharacterLoader) Prime(key uint, value *athena.Character) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type CharacterLoaderConfig

type CharacterLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Character, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

CharacterLoaderConfig captures the config to create a new CharacterLoader

type ConstellationLoader

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

ConstellationLoader batches and caches requests

func NewConstellationLoader

func NewConstellationLoader(config ConstellationLoaderConfig) *ConstellationLoader

NewConstellationLoader creates a new ConstellationLoader given a fetch, wait, and maxBatch

func (*ConstellationLoader) Clear

func (l *ConstellationLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*ConstellationLoader) Load

Load a Constellation by key, batching and caching will be applied automatically

func (*ConstellationLoader) LoadAll

func (l *ConstellationLoader) LoadAll(keys []uint) ([]*athena.Constellation, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*ConstellationLoader) LoadAllThunk

func (l *ConstellationLoader) LoadAllThunk(keys []uint) func() ([]*athena.Constellation, []error)

LoadAllThunk returns a function that when called will block waiting for a Constellations. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*ConstellationLoader) LoadThunk

func (l *ConstellationLoader) LoadThunk(key uint) func() (*athena.Constellation, error)

LoadThunk returns a function that when called will block waiting for a Constellation. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*ConstellationLoader) Prime

func (l *ConstellationLoader) Prime(key uint, value *athena.Constellation) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type ConstellationLoaderConfig

type ConstellationLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Constellation, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

ConstellationLoaderConfig captures the config to create a new ConstellationLoader

type CorporationAllianceHistoryLoader

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

CorporationAllianceHistoryLoader batches and caches requests

func NewCorporationAllianceHistoryLoader

func NewCorporationAllianceHistoryLoader(config CorporationAllianceHistoryLoaderConfig) *CorporationAllianceHistoryLoader

NewCorporationAllianceHistoryLoader creates a new CorporationAllianceHistoryLoader given a fetch, wait, and maxBatch

func (*CorporationAllianceHistoryLoader) Clear

func (l *CorporationAllianceHistoryLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*CorporationAllianceHistoryLoader) Load

Load a CorporationAllianceHistory by key, batching and caching will be applied automatically

func (*CorporationAllianceHistoryLoader) LoadAll

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*CorporationAllianceHistoryLoader) LoadAllThunk

func (l *CorporationAllianceHistoryLoader) LoadAllThunk(keys []uint) func() ([][]*athena.CorporationAllianceHistory, []error)

LoadAllThunk returns a function that when called will block waiting for a CorporationAllianceHistorys. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CorporationAllianceHistoryLoader) LoadThunk

LoadThunk returns a function that when called will block waiting for a CorporationAllianceHistory. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CorporationAllianceHistoryLoader) Prime

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type CorporationAllianceHistoryLoaderConfig

type CorporationAllianceHistoryLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([][]*athena.CorporationAllianceHistory, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

CorporationAllianceHistoryLoaderConfig captures the config to create a new CorporationAllianceHistoryLoader

type CorporationLoader

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

CorporationLoader batches and caches requests

func NewCorporationLoader

func NewCorporationLoader(config CorporationLoaderConfig) *CorporationLoader

NewCorporationLoader creates a new CorporationLoader given a fetch, wait, and maxBatch

func (*CorporationLoader) Clear

func (l *CorporationLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*CorporationLoader) Load

func (l *CorporationLoader) Load(key uint) (*athena.Corporation, error)

Load a Corporation by key, batching and caching will be applied automatically

func (*CorporationLoader) LoadAll

func (l *CorporationLoader) LoadAll(keys []uint) ([]*athena.Corporation, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*CorporationLoader) LoadAllThunk

func (l *CorporationLoader) LoadAllThunk(keys []uint) func() ([]*athena.Corporation, []error)

LoadAllThunk returns a function that when called will block waiting for a Corporations. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CorporationLoader) LoadThunk

func (l *CorporationLoader) LoadThunk(key uint) func() (*athena.Corporation, error)

LoadThunk returns a function that when called will block waiting for a Corporation. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*CorporationLoader) Prime

func (l *CorporationLoader) Prime(key uint, value *athena.Corporation) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type CorporationLoaderConfig

type CorporationLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Corporation, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

CorporationLoaderConfig captures the config to create a new CorporationLoader

type FactionLoader

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

FactionLoader batches and caches requests

func NewFactionLoader

func NewFactionLoader(config FactionLoaderConfig) *FactionLoader

NewFactionLoader creates a new FactionLoader given a fetch, wait, and maxBatch

func (*FactionLoader) Clear

func (l *FactionLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*FactionLoader) Load

func (l *FactionLoader) Load(key uint) (*athena.Faction, error)

Load a Faction by key, batching and caching will be applied automatically

func (*FactionLoader) LoadAll

func (l *FactionLoader) LoadAll(keys []uint) ([]*athena.Faction, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*FactionLoader) LoadAllThunk

func (l *FactionLoader) LoadAllThunk(keys []uint) func() ([]*athena.Faction, []error)

LoadAllThunk returns a function that when called will block waiting for a Factions. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FactionLoader) LoadThunk

func (l *FactionLoader) LoadThunk(key uint) func() (*athena.Faction, error)

LoadThunk returns a function that when called will block waiting for a Faction. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*FactionLoader) Prime

func (l *FactionLoader) Prime(key uint, value *athena.Faction) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type FactionLoaderConfig

type FactionLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Faction, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

FactionLoaderConfig captures the config to create a new FactionLoader

type GroupLoader

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

GroupLoader batches and caches requests

func NewGroupLoader

func NewGroupLoader(config GroupLoaderConfig) *GroupLoader

NewGroupLoader creates a new GroupLoader given a fetch, wait, and maxBatch

func (*GroupLoader) Clear

func (l *GroupLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*GroupLoader) Load

func (l *GroupLoader) Load(key uint) (*athena.Group, error)

Load a Group by key, batching and caching will be applied automatically

func (*GroupLoader) LoadAll

func (l *GroupLoader) LoadAll(keys []uint) ([]*athena.Group, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*GroupLoader) LoadAllThunk

func (l *GroupLoader) LoadAllThunk(keys []uint) func() ([]*athena.Group, []error)

LoadAllThunk returns a function that when called will block waiting for a Groups. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*GroupLoader) LoadThunk

func (l *GroupLoader) LoadThunk(key uint) func() (*athena.Group, error)

LoadThunk returns a function that when called will block waiting for a Group. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*GroupLoader) Prime

func (l *GroupLoader) Prime(key uint, value *athena.Group) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type GroupLoaderConfig

type GroupLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Group, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

GroupLoaderConfig captures the config to create a new GroupLoader

type RaceLoader

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

RaceLoader batches and caches requests

func NewRaceLoader

func NewRaceLoader(config RaceLoaderConfig) *RaceLoader

NewRaceLoader creates a new RaceLoader given a fetch, wait, and maxBatch

func (*RaceLoader) Clear

func (l *RaceLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*RaceLoader) Load

func (l *RaceLoader) Load(key uint) (*athena.Race, error)

Load a Race by key, batching and caching will be applied automatically

func (*RaceLoader) LoadAll

func (l *RaceLoader) LoadAll(keys []uint) ([]*athena.Race, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*RaceLoader) LoadAllThunk

func (l *RaceLoader) LoadAllThunk(keys []uint) func() ([]*athena.Race, []error)

LoadAllThunk returns a function that when called will block waiting for a Races. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*RaceLoader) LoadThunk

func (l *RaceLoader) LoadThunk(key uint) func() (*athena.Race, error)

LoadThunk returns a function that when called will block waiting for a Race. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*RaceLoader) Prime

func (l *RaceLoader) Prime(key uint, value *athena.Race) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type RaceLoaderConfig

type RaceLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Race, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

RaceLoaderConfig captures the config to create a new RaceLoader

type RegionLoader

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

RegionLoader batches and caches requests

func NewRegionLoader

func NewRegionLoader(config RegionLoaderConfig) *RegionLoader

NewRegionLoader creates a new RegionLoader given a fetch, wait, and maxBatch

func (*RegionLoader) Clear

func (l *RegionLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*RegionLoader) Load

func (l *RegionLoader) Load(key uint) (*athena.Region, error)

Load a Region by key, batching and caching will be applied automatically

func (*RegionLoader) LoadAll

func (l *RegionLoader) LoadAll(keys []uint) ([]*athena.Region, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*RegionLoader) LoadAllThunk

func (l *RegionLoader) LoadAllThunk(keys []uint) func() ([]*athena.Region, []error)

LoadAllThunk returns a function that when called will block waiting for a Regions. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*RegionLoader) LoadThunk

func (l *RegionLoader) LoadThunk(key uint) func() (*athena.Region, error)

LoadThunk returns a function that when called will block waiting for a Region. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*RegionLoader) Prime

func (l *RegionLoader) Prime(key uint, value *athena.Region) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type RegionLoaderConfig

type RegionLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Region, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

RegionLoaderConfig captures the config to create a new RegionLoader

type SolarSystemLoader

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

SolarSystemLoader batches and caches requests

func NewSolarSystemLoader

func NewSolarSystemLoader(config SolarSystemLoaderConfig) *SolarSystemLoader

NewSolarSystemLoader creates a new SolarSystemLoader given a fetch, wait, and maxBatch

func (*SolarSystemLoader) Clear

func (l *SolarSystemLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*SolarSystemLoader) Load

func (l *SolarSystemLoader) Load(key uint) (*athena.SolarSystem, error)

Load a SolarSystem by key, batching and caching will be applied automatically

func (*SolarSystemLoader) LoadAll

func (l *SolarSystemLoader) LoadAll(keys []uint) ([]*athena.SolarSystem, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*SolarSystemLoader) LoadAllThunk

func (l *SolarSystemLoader) LoadAllThunk(keys []uint) func() ([]*athena.SolarSystem, []error)

LoadAllThunk returns a function that when called will block waiting for a SolarSystems. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*SolarSystemLoader) LoadThunk

func (l *SolarSystemLoader) LoadThunk(key uint) func() (*athena.SolarSystem, error)

LoadThunk returns a function that when called will block waiting for a SolarSystem. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*SolarSystemLoader) Prime

func (l *SolarSystemLoader) Prime(key uint, value *athena.SolarSystem) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type SolarSystemLoaderConfig

type SolarSystemLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.SolarSystem, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

SolarSystemLoaderConfig captures the config to create a new SolarSystemLoader

type StationLoader

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

StationLoader batches and caches requests

func NewStationLoader

func NewStationLoader(config StationLoaderConfig) *StationLoader

NewStationLoader creates a new StationLoader given a fetch, wait, and maxBatch

func (*StationLoader) Clear

func (l *StationLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*StationLoader) Load

func (l *StationLoader) Load(key uint) (*athena.Station, error)

Load a Station by key, batching and caching will be applied automatically

func (*StationLoader) LoadAll

func (l *StationLoader) LoadAll(keys []uint) ([]*athena.Station, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*StationLoader) LoadAllThunk

func (l *StationLoader) LoadAllThunk(keys []uint) func() ([]*athena.Station, []error)

LoadAllThunk returns a function that when called will block waiting for a Stations. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*StationLoader) LoadThunk

func (l *StationLoader) LoadThunk(key uint) func() (*athena.Station, error)

LoadThunk returns a function that when called will block waiting for a Station. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*StationLoader) Prime

func (l *StationLoader) Prime(key uint, value *athena.Station) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type StationLoaderConfig

type StationLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Station, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

StationLoaderConfig captures the config to create a new StationLoader

type StructureLoader

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

StructureLoader batches and caches requests

func NewStructureLoader

func NewStructureLoader(config StructureLoaderConfig) *StructureLoader

NewStructureLoader creates a new StructureLoader given a fetch, wait, and maxBatch

func (*StructureLoader) Clear

func (l *StructureLoader) Clear(key uint64)

Clear the value at key from the cache, if it exists

func (*StructureLoader) Load

func (l *StructureLoader) Load(key uint64) (*athena.Structure, error)

Load a Structure by key, batching and caching will be applied automatically

func (*StructureLoader) LoadAll

func (l *StructureLoader) LoadAll(keys []uint64) ([]*athena.Structure, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*StructureLoader) LoadAllThunk

func (l *StructureLoader) LoadAllThunk(keys []uint64) func() ([]*athena.Structure, []error)

LoadAllThunk returns a function that when called will block waiting for a Structures. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*StructureLoader) LoadThunk

func (l *StructureLoader) LoadThunk(key uint64) func() (*athena.Structure, error)

LoadThunk returns a function that when called will block waiting for a Structure. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*StructureLoader) Prime

func (l *StructureLoader) Prime(key uint64, value *athena.Structure) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type StructureLoaderConfig

type StructureLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint64) ([]*athena.Structure, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

StructureLoaderConfig captures the config to create a new StructureLoader

type TypeLoader

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

TypeLoader batches and caches requests

func NewTypeLoader

func NewTypeLoader(config TypeLoaderConfig) *TypeLoader

NewTypeLoader creates a new TypeLoader given a fetch, wait, and maxBatch

func (*TypeLoader) Clear

func (l *TypeLoader) Clear(key uint)

Clear the value at key from the cache, if it exists

func (*TypeLoader) Load

func (l *TypeLoader) Load(key uint) (*athena.Type, error)

Load a Type by key, batching and caching will be applied automatically

func (*TypeLoader) LoadAll

func (l *TypeLoader) LoadAll(keys []uint) ([]*athena.Type, []error)

LoadAll fetches many keys at once. It will be broken into appropriate sized sub batches depending on how the loader is configured

func (*TypeLoader) LoadAllThunk

func (l *TypeLoader) LoadAllThunk(keys []uint) func() ([]*athena.Type, []error)

LoadAllThunk returns a function that when called will block waiting for a Types. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*TypeLoader) LoadThunk

func (l *TypeLoader) LoadThunk(key uint) func() (*athena.Type, error)

LoadThunk returns a function that when called will block waiting for a Type. This method should be used if you want one goroutine to make requests to many different data loaders without blocking until the thunk is called.

func (*TypeLoader) Prime

func (l *TypeLoader) Prime(key uint, value *athena.Type) bool

Prime the cache with the provided key and value. If the key already exists, no change is made and false is returned. (To forcefully prime the cache, clear the key first with loader.clear(key).prime(key, value).)

type TypeLoaderConfig

type TypeLoaderConfig struct {
	// Fetch is a method that provides the data for the loader
	Fetch func(keys []uint) ([]*athena.Type, []error)

	// Wait is how long wait before sending a batch
	Wait time.Duration

	// MaxBatch will limit the maximum number of keys to send in one batch, 0 = not limit
	MaxBatch int
}

TypeLoaderConfig captures the config to create a new TypeLoader

Jump to

Keyboard shortcuts

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