Documentation ¶
Index ¶
- Variables
- func LaunchPerfBufferConsumers(objs bpfObjects, connectionFactory *connection.Factory, stopper chan os.Signal, ...)
- func LogAny(value string) error
- type Hook
- func (h *Hook) AppendMocks(m *models.Mock) error
- func (h *Hook) CleanProxyEntry(srcPort uint16)
- func (h *Hook) FetchDep(indx int) *models.Mock
- func (h *Hook) GetConfigMocks() []*models.Mock
- func (h *Hook) GetDepsSize() int
- func (h *Hook) GetDestinationInfo(srcPort uint16) (*structs.DestInfo, error)
- func (h *Hook) GetResp() *models.HttpResp
- func (h *Hook) GetTcsMocks() []*models.Mock
- func (h *Hook) GetUserIP() string
- func (h *Hook) IsDockerRelatedCmd(cmd string) (bool, string)
- func (h *Hook) LaunchUserApplication(appCmd, appContainer, appNetwork string, Delay uint64) error
- func (h *Hook) LoadHooks(appCmd, appContainer string) error
- func (h *Hook) PopFront()
- func (h *Hook) PrintRedirectProxyMap()
- func (h *Hook) PutResp(resp *models.HttpResp) error
- func (h *Hook) ResetDeps() int
- func (h *Hook) SendKeployPid(kPid uint32) error
- func (h *Hook) SendNameSpaceId(key uint32, inode uint64) error
- func (h *Hook) SendProxyInfo(ip4, port uint32, ip6 [4]uint32) error
- func (h *Hook) SetConfigMocks(m []*models.Mock)
- func (h *Hook) SetKeployModeInKernel(mode uint32)
- func (h *Hook) SetTcsMocks(m []*models.Mock)
- func (h *Hook) Stop(forceStop bool)
- func (h *Hook) StopUserApplication()
Constants ¶
This section is empty.
Variables ¶
View Source
var Emoji = "\U0001F430" + " Keploy:"
View Source
var PerfEventReaders []*perf.Reader
View Source
var RingEventReaders []*ringbuf.Reader
Functions ¶
func LaunchPerfBufferConsumers ¶
func LaunchPerfBufferConsumers(objs bpfObjects, connectionFactory *connection.Factory, stopper chan os.Signal, logger *zap.Logger)
LaunchPerfBufferConsumers launches socket events
Types ¶
type Hook ¶
type Hook struct { platform.TestCaseDB // contains filtered or unexported fields }
func (*Hook) CleanProxyEntry ¶
func (*Hook) GetConfigMocks ¶
func (*Hook) GetDepsSize ¶
func (*Hook) GetDestinationInfo ¶
func (*Hook) GetTcsMocks ¶
func (*Hook) IsDockerRelatedCmd ¶
It checks if the cmd is related to docker or not, it also returns if its a docker compose file
func (*Hook) LaunchUserApplication ¶
func (*Hook) LoadHooks ¶
LoadHooks is used to attach the eBPF hooks into the linux kernel. Hooks are attached for outgoing and incoming network requests.
proxyPorts is used for redirecting outgoing network calls to the unoccupied proxy server.
$BPF_CLANG and $BPF_CFLAGS are set by the Makefile.
func (*Hook) PrintRedirectProxyMap ¶
func (h *Hook) PrintRedirectProxyMap()
// printing the whole map
func (*Hook) SendKeployPid ¶
func (*Hook) SendNameSpaceId ¶
This function is helpful when user application in running inside a docker container.
func (*Hook) SendProxyInfo ¶
This function sends the IP and Port of the running proxy in the eBPF program.
func (*Hook) SetConfigMocks ¶
func (*Hook) SetKeployModeInKernel ¶
func (*Hook) SetTcsMocks ¶
func (*Hook) StopUserApplication ¶
func (h *Hook) StopUserApplication()
StopUserApplication stops the user application
Click to show internal directories.
Click to hide internal directories.