package toxiproxy
import "github.com/IBM/sarama/internal/toxiproxy"
Index ¶
- type Attributes
- type Client
- func NewClient(endpoint string) *Client
- func (c *Client) CreateProxy( name string, listenAddr string, targetAddr string, ) (*Proxy, error)
- func (c *Client) Proxy(name string) (*Proxy, error)
- func (c *Client) ResetState() error
- type Proxy
- func (p *Proxy) AddToxic( name string, toxicType string, stream string, toxicity float32, attributes Attributes, ) (*Toxic, error)
- func (p *Proxy) Disable() error
- func (p *Proxy) Enable() error
- func (p *Proxy) Save() (*Proxy, error)
- type Toxic
Types ¶
type Attributes ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func (*Client) CreateProxy ¶
func (*Client) Proxy ¶
func (*Client) ResetState ¶
type Proxy ¶
type Proxy struct { Name string `json:"name"` ListenAddr string `json:"listen"` TargetAddr string `json:"upstream"` Enabled bool `json:"enabled"` // contains filtered or unexported fields }
func (*Proxy) AddToxic ¶
func (p *Proxy) AddToxic( name string, toxicType string, stream string, toxicity float32, attributes Attributes, ) (*Toxic, error)
func (*Proxy) Disable ¶
func (*Proxy) Enable ¶
func (*Proxy) Save ¶
type Toxic ¶
type Toxic struct { Name string `json:"name"` Type string `json:"type"` Stream string `json:"stream,omitempty"` Toxicity float32 `json:"toxicity"` Attributes Attributes `json:"attributes"` }
Source Files ¶
- Version
- v1.45.1 (latest)
- Published
- Mar 2, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 1 day ago –
Tools for package owners.