requestlogs

package
v0.0.0-...-f94be1b Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRequestLogs

func InitRequestLogs(ln int, maxTTL int)

Initialize request logs with maximum no. of requests & maxTTL in seconds

func Put

func Put(k string, v ActiveRequestLog)

Init request logs by request Id

Types

type ActiveRequestLog

type ActiveRequestLog struct {
	LogsDiffing *sync.WaitGroup
	Output      chan LogsResults
}

func Delete

func Delete(k string) (v *ActiveRequestLog)

Delete request logs by request Id

func Get

func Get(k string) (v *ActiveRequestLog)

Get request logs by request Id

type ActiveRequestLogData

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

type ActiveRequestLogsTTLMap

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

type LogsResults

type LogsResults struct {
	LogType   string // can be `request` or `response`
	LogTime   string // can be `before` or `after`
	Data      RequestData
	Stage     string
	TimeTaken float64
}

type RequestData

type RequestData struct {
	Body    string
	Headers http.Header
	URL     string
	Method  string
}

Jump to

Keyboard shortcuts

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