agent

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package agent implements functions for injecting faults in a target

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent maintains the state required for executing an agent command

func Start added in v0.3.10

func Start(env runtime.Environment, config *Config) (*Agent, error)

Start creates and starts a new instance of an agent. Returned agent is guaranteed to be unique in the environment it is running, and will handle signals sent to the process. Callers must Stop the returned agent at the end of its lifecycle.

func (*Agent) ApplyDisruption

func (a *Agent) ApplyDisruption(ctx context.Context, disruptor Disruptor, duration time.Duration) error

ApplyDisruption applies a disruption to the target

func (*Agent) Stop added in v0.3.10

func (a *Agent) Stop()

Stop stops a running agent: It releases

type Config

type Config struct {
	Profiler *profiler.Config
}

Config maintains the configuration for the execution of the agent

type Disruptor added in v0.3.11

type Disruptor interface {
	Apply(context.Context, time.Duration) error
}

Disruptor defines the interface for applying disruptions

Directories

Path Synopsis
Package protocol implements the agent that injects disruptors in protocols.
Package protocol implements the agent that injects disruptors in protocols.
grpc
Package grpc implements a proxy that applies disruptions to gRPC requests This package is inspired by and extensively copies code from https://github.com/mwitkow/grpc-proxy
Package grpc implements a proxy that applies disruptions to gRPC requests This package is inspired by and extensively copies code from https://github.com/mwitkow/grpc-proxy
http
Package http implements a proxy that applies disruptions to HTTP requests
Package http implements a proxy that applies disruptions to HTTP requests
Package stressors implements resource stressors for CPU, Memory, I/O and network
Package stressors implements resource stressors for CPU, Memory, I/O and network
Package tcpconn contains a TCP connection disruptor.
Package tcpconn contains a TCP connection disruptor.

Jump to

Keyboard shortcuts

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