Documentation
¶
Overview ¶
Package testtoxiproxy provides a small Toxiproxy HTTP client for integration tests.
Index ¶
- type Client
- func (client *Client) AddTimeout(ctx context.Context, proxy, name string) error
- func (client *Client) CreateProxy(ctx context.Context, name, listen, upstream string) (*Proxy, error)
- func (client *Client) DeleteProxy(ctx context.Context, name string) error
- func (client *Client) RemoveToxic(ctx context.Context, proxy, name string) error
- func (client *Client) SetEnabled(ctx context.Context, name string, enabled bool) error
- func (client *Client) Wait(ctx context.Context) error
- type Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client communicates with a Toxiproxy HTTP API.
func (*Client) AddTimeout ¶
AddTimeout drops downstream traffic until the named toxic is removed.
func (*Client) CreateProxy ¶
func (client *Client) CreateProxy(ctx context.Context, name, listen, upstream string) (*Proxy, error)
CreateProxy creates an enabled proxy that listens locally and forwards upstream.
func (*Client) DeleteProxy ¶
DeleteProxy removes a proxy.
func (*Client) RemoveToxic ¶
RemoveToxic deletes a toxic from a proxy.
func (*Client) SetEnabled ¶
SetEnabled enables or disables a proxy.
Click to show internal directories.
Click to hide internal directories.