Documentation ¶
Index ¶
- Variables
- type Command
- type DefaultFoundation
- func (f *DefaultFoundation) Chdir(s string) error
- func (f *DefaultFoundation) CurrentUser() (*user.User, error)
- func (f *DefaultFoundation) DryRun() bool
- func (f *DefaultFoundation) ExecCommand(ctx context.Context, name string, args []string) Command
- func (f *DefaultFoundation) Fs() Fs
- func (f *DefaultFoundation) GenerateUuid() string
- func (f *DefaultFoundation) Getwd() (string, error)
- func (f *DefaultFoundation) HttpClient() HttpClient
- func (f *DefaultFoundation) Logger() *zap.SugaredLogger
- func (f *DefaultFoundation) LookupEnvVar(key string) (string, bool)
- func (f *DefaultFoundation) User(username string) (*user.User, error)
- func (f *DefaultFoundation) UserGroup(u *user.User) (*user.Group, error)
- func (f *DefaultFoundation) UserHomeDir() (string, error)
- func (f *DefaultFoundation) VegetaAttacker() VegetaAttacker
- func (f *DefaultFoundation) VegetaMetrics() VegetaMetrics
- type DefaultVegetaMetrics
- type DryRunCommand
- func (c DryRunCommand) IsRunning() bool
- func (c DryRunCommand) ProcessPid() int
- func (c DryRunCommand) ProcessSignal(sig os.Signal) error
- func (c DryRunCommand) Run() error
- func (c DryRunCommand) SetStderr(stdout io.Writer)
- func (c DryRunCommand) SetStdout(stdout io.Writer)
- func (c DryRunCommand) Start() error
- func (c DryRunCommand) StderrPipe() (io.ReadCloser, error)
- func (c DryRunCommand) StdoutPipe() (io.ReadCloser, error)
- func (c DryRunCommand) String() string
- func (c DryRunCommand) Wait() error
- type DryRunHttpClient
- type DryRunVegetaAttacker
- type DummyReaderCloser
- type ExecCommand
- func (c ExecCommand) IsRunning() bool
- func (c ExecCommand) ProcessPid() int
- func (c ExecCommand) ProcessSignal(sig os.Signal) error
- func (c ExecCommand) Run() error
- func (c ExecCommand) SetStderr(stderr io.Writer)
- func (c ExecCommand) SetStdout(stdout io.Writer)
- func (c ExecCommand) Start() error
- func (c ExecCommand) StderrPipe() (io.ReadCloser, error)
- func (c ExecCommand) StdoutPipe() (io.ReadCloser, error)
- func (c ExecCommand) String() string
- func (c ExecCommand) Wait() error
- type File
- type Foundation
- type Fs
- type HttpClient
- type RealHttpClient
- type RealVegetaAttacker
- type VegetaAttacker
- type VegetaMetrics
Constants ¶
This section is empty.
Variables ¶
View Source
var MemoryFs = afero.NewMemMapFs()
View Source
var OsFs = afero.NewOsFs()
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface { IsRunning() bool Start() error Run() error ProcessPid() int ProcessSignal(sig os.Signal) error StdoutPipe() (io.ReadCloser, error) StderrPipe() (io.ReadCloser, error) SetStdout(stdout io.Writer) SetStderr(stdout io.Writer) String() string Wait() error }
func NewDryRunCommand ¶
type DefaultFoundation ¶
type DefaultFoundation struct {
// contains filtered or unexported fields
}
func (*DefaultFoundation) Chdir ¶
func (f *DefaultFoundation) Chdir(s string) error
func (*DefaultFoundation) CurrentUser ¶
func (f *DefaultFoundation) CurrentUser() (*user.User, error)
func (*DefaultFoundation) DryRun ¶
func (f *DefaultFoundation) DryRun() bool
func (*DefaultFoundation) ExecCommand ¶
func (*DefaultFoundation) Fs ¶
func (f *DefaultFoundation) Fs() Fs
func (*DefaultFoundation) GenerateUuid ¶
func (f *DefaultFoundation) GenerateUuid() string
func (*DefaultFoundation) Getwd ¶
func (f *DefaultFoundation) Getwd() (string, error)
func (*DefaultFoundation) HttpClient ¶
func (f *DefaultFoundation) HttpClient() HttpClient
func (*DefaultFoundation) Logger ¶
func (f *DefaultFoundation) Logger() *zap.SugaredLogger
func (*DefaultFoundation) LookupEnvVar ¶
func (f *DefaultFoundation) LookupEnvVar(key string) (string, bool)
func (*DefaultFoundation) User ¶
func (f *DefaultFoundation) User(username string) (*user.User, error)
func (*DefaultFoundation) UserHomeDir ¶
func (f *DefaultFoundation) UserHomeDir() (string, error)
func (*DefaultFoundation) VegetaAttacker ¶
func (f *DefaultFoundation) VegetaAttacker() VegetaAttacker
func (*DefaultFoundation) VegetaMetrics ¶
func (f *DefaultFoundation) VegetaMetrics() VegetaMetrics
type DefaultVegetaMetrics ¶
type DefaultVegetaMetrics struct {
// contains filtered or unexported fields
}
func (DefaultVegetaMetrics) Add ¶
func (m DefaultVegetaMetrics) Add(r *vegeta.Result)
func (DefaultVegetaMetrics) Close ¶
func (m DefaultVegetaMetrics) Close()
func (DefaultVegetaMetrics) Metrics ¶
func (m DefaultVegetaMetrics) Metrics() *vegeta.Metrics
type DryRunCommand ¶
type DryRunCommand struct {
// contains filtered or unexported fields
}
func (DryRunCommand) IsRunning ¶
func (c DryRunCommand) IsRunning() bool
func (DryRunCommand) ProcessPid ¶
func (c DryRunCommand) ProcessPid() int
func (DryRunCommand) ProcessSignal ¶
func (c DryRunCommand) ProcessSignal(sig os.Signal) error
func (DryRunCommand) Run ¶
func (c DryRunCommand) Run() error
func (DryRunCommand) SetStderr ¶
func (c DryRunCommand) SetStderr(stdout io.Writer)
func (DryRunCommand) SetStdout ¶
func (c DryRunCommand) SetStdout(stdout io.Writer)
func (DryRunCommand) Start ¶
func (c DryRunCommand) Start() error
func (DryRunCommand) StderrPipe ¶
func (c DryRunCommand) StderrPipe() (io.ReadCloser, error)
func (DryRunCommand) StdoutPipe ¶
func (c DryRunCommand) StdoutPipe() (io.ReadCloser, error)
func (DryRunCommand) String ¶
func (c DryRunCommand) String() string
func (DryRunCommand) Wait ¶
func (c DryRunCommand) Wait() error
type DryRunHttpClient ¶
type DryRunHttpClient struct { }
type DryRunVegetaAttacker ¶
type DryRunVegetaAttacker struct{}
type DummyReaderCloser ¶
type DummyReaderCloser struct{}
func (*DummyReaderCloser) Close ¶
func (drc *DummyReaderCloser) Close() error
type ExecCommand ¶
type ExecCommand struct {
// contains filtered or unexported fields
}
func (ExecCommand) IsRunning ¶
func (c ExecCommand) IsRunning() bool
func (ExecCommand) ProcessPid ¶
func (c ExecCommand) ProcessPid() int
func (ExecCommand) ProcessSignal ¶
func (c ExecCommand) ProcessSignal(sig os.Signal) error
func (ExecCommand) Run ¶
func (c ExecCommand) Run() error
func (ExecCommand) SetStderr ¶
func (c ExecCommand) SetStderr(stderr io.Writer)
func (ExecCommand) SetStdout ¶
func (c ExecCommand) SetStdout(stdout io.Writer)
func (ExecCommand) Start ¶
func (c ExecCommand) Start() error
func (ExecCommand) StderrPipe ¶
func (c ExecCommand) StderrPipe() (io.ReadCloser, error)
func (ExecCommand) StdoutPipe ¶
func (c ExecCommand) StdoutPipe() (io.ReadCloser, error)
func (ExecCommand) String ¶
func (c ExecCommand) String() string
func (ExecCommand) Wait ¶
func (c ExecCommand) Wait() error
type Foundation ¶
type Foundation interface { Logger() *zap.SugaredLogger Fs() Fs CurrentUser() (*user.User, error) Chdir(string) error Getwd() (string, error) DryRun() bool User(username string) (*user.User, error) UserGroup(u *user.User) (*user.Group, error) UserHomeDir() (string, error) LookupEnvVar(key string) (string, bool) ExecCommand(ctx context.Context, name string, args []string) Command HttpClient() HttpClient VegetaAttacker() VegetaAttacker VegetaMetrics() VegetaMetrics GenerateUuid() string }
func NewFoundation ¶
func NewFoundation(logger *zap.SugaredLogger, dryRun bool) Foundation
type HttpClient ¶
func NewDryRunHttpClient ¶
func NewDryRunHttpClient() HttpClient
func NewRealHttpClient ¶
func NewRealHttpClient() HttpClient
type RealHttpClient ¶
type RealHttpClient struct {
// contains filtered or unexported fields
}
type RealVegetaAttacker ¶
type RealVegetaAttacker struct {
// contains filtered or unexported fields
}
type VegetaAttacker ¶
type VegetaAttacker interface {
Attack(targeter vegeta.Targeter, rate vegeta.Rate, duration time.Duration, name string) <-chan *vegeta.Result
}
func NewDryRunVegetaAttacker ¶
func NewDryRunVegetaAttacker() VegetaAttacker
func NewRealVegetaAttacker ¶
func NewRealVegetaAttacker() VegetaAttacker
type VegetaMetrics ¶
func NewDefaultVegetaMetrics ¶
func NewDefaultVegetaMetrics() VegetaMetrics
Click to show internal directories.
Click to hide internal directories.