Documentation ¶
Index ¶
- func GenerateAndFilterMonkees(ctx context.Context, monkeysPerRequest uint, filter CmdLineFilter) (monkeyStatsRecieve <-chan MonkeyStats, deltaStatsRecieve <-chan Stats)
- func GetOdds(filter CmdLineFilter) float64
- func OutputMonkeyData(targetDir string, targetFormat string, monkeyDataChan <-chan MonkeyStats)
- func SetupHTTP(transport *http.Transport, client *http.Client)
- func SimplifyFilters(filter *CmdLineFilter)
- type CmdLineFilter
- type MonkeyBase
- type MonkeyStats
- type RingBuffer
- type Stats
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 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()
Click to show internal directories.
Click to hide internal directories.