blow

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Gray = uint8(iota + 90)
	Red
	Green
	Yellow
	Blue
	Magenta
	Cyan
	White

	EndColor = "\033[0m"
)

Variables

This section is empty.

Functions

func Color

func Color(str string, color uint8) string

func ColorStart

func ColorStart(color uint8) string

func ColorfulHTML

func ColorfulHTML(str string) string

func ColorfulHeader

func ColorfulHeader(str string) string

func ColorfulResponse

func ColorfulResponse(str string, isJSON bool, pretty bool) string

func IsBlowEnv

func IsBlowEnv() bool

func NewConditionalLock

func NewConditionalLock(condition bool) sync.Locker

func TryStartAsBlow

func TryStartAsBlow() bool

Types

type Bench

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

func (*Bench) Final

func (b *Bench) Final(_ context.Context, conf *berf.Config) error

func (*Bench) Init

func (b *Bench) Init(ctx context.Context, conf *berf.Config) (*berf.BenchOption, error)

func (*Bench) Invoke

func (b *Bench) Invoke(_ context.Context, conf *berf.Config) (*berf.Result, error)

func (*Bench) Name

func (b *Bench) Name(context.Context, *berf.Config) string

type ConditionLock

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

func (*ConditionLock) Lock

func (c *ConditionLock) Lock()

func (*ConditionLock) Unlock

func (c *ConditionLock) Unlock()

type Durations

type Durations struct {
	Default time.Duration
	Map     map[string]time.Duration
}

func (*Durations) Get

func (d *Durations) Get(keys ...string) time.Duration

type HttpieArg

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

func (*HttpieArg) AddQuery

func (a *HttpieArg) AddQuery(k, v string)

func (*HttpieArg) Build

func (a *HttpieArg) Build(method string, form bool) *HttpieArgBody

func (*HttpieArg) MaybePost

func (a *HttpieArg) MaybePost() bool

func (*HttpieArg) SetHeader

func (a *HttpieArg) SetHeader(k, v string)

func (*HttpieArg) SetJsonMap

func (a *HttpieArg) SetJsonMap(k string, v interface{})

func (*HttpieArg) SetParam

func (a *HttpieArg) SetParam(k, v string)

func (*HttpieArg) SetPostFile

func (a *HttpieArg) SetPostFile(formname, filename string)

type HttpieArgBody

type HttpieArgBody struct {
	Multipart   bool
	ContentType string
	Body        io.ReadCloser

	BodyString string
}

type Invoker

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

func Blow

func Blow(ctx context.Context, conf *berf.Config) *Invoker

func NewInvoker

func NewInvoker(ctx context.Context, opt *Opt) (*Invoker, error)

func (*Invoker) Run

func (r *Invoker) Run(*berf.Config) (*berf.Result, error)

type Opt

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

func (*Opt) MaybePost

func (opt *Opt) MaybePost() bool

type Pair

type Pair struct {
	V1, V2 string
}

Directories

Path Synopsis
Package lossy simulates bandwidth, latency and packet loss for net.PacketConn and net.Conn interfaces.
Package lossy simulates bandwidth, latency and packet loss for net.PacketConn and net.Conn interfaces.

Jump to

Keyboard shortcuts

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