Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartLoadGen ¶
func StartLoadGen(ctx context.Context, loadConfig Config, loadGenOpts LoadGenOpts)
Types ¶
type Config ¶
type Config struct {
AdsPerSec uint `json:"adsPerSec"`
// A generator to specify how many entries per ad.
// A function so the caller can define a distribution to follow.
EntriesPerAdGenerator func() uint `json:"-"`
// For json to be able to use a predefined distribution.
EntriesPerAdType string `json:"entriesPerAdType"`
EntriesPerChunk uint `json:"entriesPerChunk"`
// Should this provider be an http provider?
IsHttp bool `json:"isHttp"`
HttpListenAddr string `json:"httpListenAddr"`
// How many of the last N ads should be kept. 0 means every ad is kept.
KeepNAds uint `json:"keepNAds"`
Seed uint64 `json:"seed"`
StopAfterNEntries uint64 `json:"stopAfterNEntries"`
ListenMultiaddr string `json:"listenMultiaddr"`
GossipSubTopic string `json:"gossipSubTopic"`
}
func DefaultConfig ¶
func DefaultConfig() Config
func LoadConfigFromFile ¶
func (*Config) ParseEntriesPerAdGenerator ¶
Click to show internal directories.
Click to hide internal directories.