Documentation ¶
Overview ¶
Package proxy TCP-based fault injection
Index ¶
- Variables
- type MockType
- type Plan
- type Proxy
- func (p *Proxy) AddDelay(name string, delay, percentage int, clientAddr, command string) error
- func (p *Proxy) AddDrop(name string, percentage int, clientAddr, command string) error
- func (p *Proxy) AddJitter(name string, jitter, percentage int, clientAddr, command string) error
- func (p *Proxy) AddReturnEmpty(name string, percentage int, clientAddr, command string) error
- func (p *Proxy) AddReturnErr(name string, returnErr error, percentage int, clientAddr, command string) error
- func (p *Proxy) DeleteAllRule()
- func (p *Proxy) StartProxy() error
- func (p *Proxy) StopProxy()
- func (p *Proxy) Write(src net.Conn, rule *Rule) bool
- type RedisError
- type Rule
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned iff SelectRule can't find a Rule that applies ErrNotFound = errors.New("no matching rule found") )
Functions ¶
This section is empty.
Types ¶
type Plan ¶
type Plan struct {
// contains filtered or unexported fields
}
func (*Plan) DeleteAllRule ¶
func (p *Plan) DeleteAllRule()
func (*Plan) DeleteRule ¶
type Proxy ¶
Proxy real service agent
func (*Proxy) AddReturnEmpty ¶
func (*Proxy) AddReturnErr ¶
func (*Proxy) DeleteAllRule ¶
func (p *Proxy) DeleteAllRule()
func (*Proxy) StartProxy ¶
type RedisError ¶
type RedisError string
RedisError rediserror
func (RedisError) Error ¶
func (e RedisError) Error() string
func (RedisError) RedisError ¶
func (RedisError) RedisError()
type Rule ¶
type Rule struct { Name string `json:"name,omiempty"` Delay int `json:"delay,omitempty"` Jitter int `json:"jitter,omitempty"` Drop bool `json:"drop,omitempty"` ReturnEmpty bool `json:"return_empty,omitempty"` ReturnErr error `json:"return_err,omitempty"` Percentage int `json:"percentage,omitempty"` // SelectRule does prefix matching on this value ClientAddr string `json:"client_addr,omitempty"` Command string `json:"command,omitempty"` // contains filtered or unexported fields }
Directories ¶
Path | Synopsis |
---|---|
Package proxymysql Mysql TCP-based fault injection
|
Package proxymysql Mysql TCP-based fault injection |
Package proxyredis Redis TCP-based fault injection
|
Package proxyredis Redis TCP-based fault injection |
Package utils Test tool
|
Package utils Test tool |
Click to show internal directories.
Click to hide internal directories.