Documentation ¶
Index ¶
Constants ¶
View Source
const ( // The fallback to trying compression algorithms is more exprensive because there doesn't seem to be a // good way of interrogating the algorithms about whether the stream is OK. So we limit the amount of // data is may consume or produce. MaxFallbackInput = 1 * 1024 * 1024 MaxFallbackOutput = 10 * 1024 * 1024 // This limit is used for non-YAML and non-JSON types that we can have some hope of parsing. MaxBufferedBody = 5 * 1024 * 1024 // For types where we just return a string (or maybe an int) then it doesn't make // sense to pull in a lot of data, just to hash it anyway. The only reason to have more than // a few bytes is so we can more reliably distinguish whether responses are identical. SmallBodySample = 10 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func MergeWitness ¶
func ToWitnessID ¶
Generates a v5 UUID as witness ID based on stream ID and seq.
func UnassignedHTTPID ¶
These need to be constructors, rather than a global var that's reused, so that there is not a race condition when marshaling to protobufs that share them. (The race condition actually manifested in obfuscate().)
func UnknownHTTPMethodMeta ¶
func UnknownHTTPMethodMeta() *pb.MethodMeta
func ValidLuhn ¶
code adopted from https://github.com/ShiraazMoollatjie/goluhn
Types ¶
type ParseAPISpecError ¶
type ParseAPISpecError string
func (ParseAPISpecError) Error ¶
func (pase ParseAPISpecError) Error() string
type PartialWitness ¶
type PartialWitness struct { Witness *pb.Witness // Key used to pair this PartialWitness up with its counterpart. PairKey akid.WitnessID }
A partial witness is a witness that only includes the argument or response. It represents a raw observation from a TCP flow and should be paired up with the corresponding observation from the opposite flow in the same TCP stream.
func ParseHTTP ¶
func ParseHTTP(elem akinet.ParsedNetworkContent) (*PartialWitness, error)
Click to show internal directories.
Click to hide internal directories.