engine

package
v0.0.0-...-e3230a5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAndFilterMonkees

func GenerateAndFilterMonkees(ctx context.Context, monkeysPerRequest uint, filter CmdLineFilter) (monkeyStatsRecieve <-chan MonkeyStats, deltaStatsRecieve <-chan Stats)

func GetOdds

func GetOdds(filter CmdLineFilter) float64

func OutputMonkeyData

func OutputMonkeyData(targetDir string, targetFormat string, monkeyDataChan <-chan MonkeyStats)

func SetupHTTP

func SetupHTTP(transport *http.Transport, client *http.Client)

func SimplifyFilters

func SimplifyFilters(filter *CmdLineFilter)

Types

type CmdLineFilter

type CmdLineFilter struct {
	HelpVanity bool     `long:"help-vanity" short:"V"`
	Hat        []string `short:"H" description:"hat option. See --help-vanity for list"`
	Glasses    []string `short:"G" description:"glasses option. See --help-vanity for list"`
	Mouth      []string `short:"O" description:"mouth option. See --help-vanity for list"`
	Cloths     []string `short:"C" description:"cloths option. See --help-vanity for list"`
	Feet       []string `short:"F" description:"feet option. See --help-vanity for list"`
	Tail       []string `short:"T" description:"tail option. See --help-vanity for list"`
	Misc       []string `short:"M" description:"misc  option. See --help-vanity for list"`
}

type MonkeyBase

type MonkeyBase struct {
	PublicAddress   string
	PrivateKey      string
	BackgroundColor string `json:"background_color"`
	Glasses         string `json:"glasses"`
	Hat             string `json:"hat"`
	Misc            string `json:"misc"`
	Mouth           string `json:"mouth"`
	ShirtPants      string `json:"shirt_pants"`
	Shoes           string `json:"shoes"`
	Tail            string `json:"tail_accessory"`
	SillyName       string `json:"silly_name"`
}

type MonkeyStats

type MonkeyStats struct {
	MonkeyBase
	Additional map[string]interface{}
}

func (MonkeyStats) MarshalJSON

func (monkey MonkeyStats) MarshalJSON() ([]byte, error)

func (*MonkeyStats) UnmarshalJSON

func (monkey *MonkeyStats) UnmarshalJSON(data []byte) (err error)

type RingBuffer

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

RingBuffer throttle buffer for implement async channel.

func NewRingBuffer

func NewRingBuffer(inCh, outCh chan interface{}) *RingBuffer

func (*RingBuffer) Run

func (r *RingBuffer) Run()

type Stats

type Stats struct {
	Total         uint64
	Found         uint64
	TotalRequests uint64
	Started       time.Time
}

Jump to

Keyboard shortcuts

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