Documentation
¶
Index ¶
- type Daemon
- func (d *Daemon) AddStartupSpammers(spammers []StartupSpammerConfig) error
- func (d *Daemon) DeleteSpammer(id int64) error
- func (d *Daemon) GetAllSpammers() []*Spammer
- func (d *Daemon) GetClientPool() *spamoor.ClientPool
- func (d *Daemon) GetGlobalCfg() map[string]interface{}
- func (d *Daemon) GetRootWallet() *spamoor.RootWallet
- func (d *Daemon) GetSpammer(id int64) *Spammer
- func (d *Daemon) LoadStartupSpammers(configFile string, logger logrus.FieldLogger) ([]StartupSpammerConfig, error)
- func (d *Daemon) NewSpammer(scenarioName string, config string, name string, description string, ...) (*Spammer, error)
- func (d *Daemon) Run() (bool, error)
- func (d *Daemon) SetGlobalCfg(name string, value interface{})
- func (d *Daemon) Shutdown()
- func (d *Daemon) UpdateSpammer(id int64, name string, description string, config string) error
- type Spammer
- func (s *Spammer) GetConfig() string
- func (s *Spammer) GetCreatedAt() int64
- func (s *Spammer) GetDescription() string
- func (s *Spammer) GetID() int64
- func (s *Spammer) GetLogScope() *logscope.LogScope
- func (s *Spammer) GetName() string
- func (s *Spammer) GetScenario() string
- func (s *Spammer) GetStatus() int
- func (s *Spammer) GetWalletPool() *spamoor.WalletPool
- func (s *Spammer) Pause() error
- func (s *Spammer) Start() error
- type SpammerConfig
- type SpammerStatus
- type StartupSpammerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
func NewDaemon ¶
func NewDaemon(parentCtx context.Context, logger logrus.FieldLogger, clientPool *spamoor.ClientPool, rootWallet *spamoor.RootWallet, txpool *spamoor.TxPool, db *db.Database) *Daemon
func (*Daemon) AddStartupSpammers ¶ added in v1.1.1
func (d *Daemon) AddStartupSpammers(spammers []StartupSpammerConfig) error
AddStartupSpammers adds the startup spammers to the daemon
func (*Daemon) DeleteSpammer ¶
func (*Daemon) GetAllSpammers ¶
func (*Daemon) GetClientPool ¶
func (d *Daemon) GetClientPool() *spamoor.ClientPool
func (*Daemon) GetGlobalCfg ¶ added in v1.1.3
func (*Daemon) GetRootWallet ¶
func (d *Daemon) GetRootWallet() *spamoor.RootWallet
func (*Daemon) GetSpammer ¶
func (*Daemon) LoadStartupSpammers ¶ added in v1.1.1
func (d *Daemon) LoadStartupSpammers(configFile string, logger logrus.FieldLogger) ([]StartupSpammerConfig, error)
LoadStartupSpammers loads the startup spammers configuration from a file
func (*Daemon) NewSpammer ¶
func (*Daemon) SetGlobalCfg ¶ added in v1.1.3
type Spammer ¶
type Spammer struct {
// contains filtered or unexported fields
}
func (*Spammer) GetCreatedAt ¶
func (*Spammer) GetDescription ¶
func (*Spammer) GetLogScope ¶
func (*Spammer) GetScenario ¶
func (*Spammer) GetWalletPool ¶
func (s *Spammer) GetWalletPool() *spamoor.WalletPool
type SpammerConfig ¶
type SpammerStatus ¶
type SpammerStatus int
const ( SpammerStatusPaused SpammerStatus = iota SpammerStatusRunning SpammerStatusFinished SpammerStatusFailed )
type StartupSpammerConfig ¶ added in v1.1.1
type StartupSpammerConfig struct {
Scenario string `yaml:"scenario"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Config map[string]interface{} `yaml:"config"`
}
StartupSpammerConfig represents a single spammer configuration in the startup config file
Click to show internal directories.
Click to hide internal directories.