jobs

package
v0.0.0-...-b89fbfb Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package jobs [contains all the attack types db1000n can simulate]

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptedContext

func EncryptedContext(ctx context.Context) context.Context

Types

type Args

type Args = map[string]interface{}

Args comment for linter

type BasicJobConfig

type BasicJobConfig struct {
	IntervalMs int `mapstructure:"interval_ms,omitempty"`
	Count      int `mapstructure:"count,omitempty"`
	// contains filtered or unexported fields
}

BasicJobConfig comment for linter

func (*BasicJobConfig) Next

func (c *BasicJobConfig) Next(ctx context.Context) bool

Next comment for linter

type Config

type Config struct {
	Name   string `mapstructure:"name"`
	Type   string `mapstructure:"type"`
	Count  int    `mapstructure:"count"`
	Filter string `mapstructure:"filter"`
	Args   Args   `mapstructure:"args"`
}

Config comment for linter

type GlobalConfig

type GlobalConfig struct {
	ClientID string

	ProxyURLs           string
	SkipEncrypted       bool
	EnablePrimitiveJobs bool
	ScaleFactor         int
}

GlobalConfig passes commandline arguments to every job.

func NewGlobalConfigWithFlags

func NewGlobalConfigWithFlags() *GlobalConfig

NewGlobalConfigWithFlags returns a GlobalConfig initialized with command line flags.

type Job

type Job = func(ctx context.Context, logger *zap.Logger, globalConfig *GlobalConfig, args Args) (data interface{}, err error)

Job comment for linter

func Get

func Get(t string) Job

Get job by type name

Jump to

Keyboard shortcuts

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