2018-01-12 17:30:54 +01:00
|
|
|
package fs
|
|
|
|
|
|
|
|
// DumpFlags describes the Dump options in force
|
2023-10-03 13:56:17 +02:00
|
|
|
type DumpFlags = Bits[dumpChoices]
|
2018-01-12 17:30:54 +01:00
|
|
|
|
|
|
|
// DumpFlags definitions
|
|
|
|
const (
|
|
|
|
DumpHeaders DumpFlags = 1 << iota
|
|
|
|
DumpBodies
|
|
|
|
DumpRequests
|
|
|
|
DumpResponses
|
|
|
|
DumpAuth
|
|
|
|
DumpFilters
|
2018-04-11 15:16:55 +02:00
|
|
|
DumpGoRoutines
|
|
|
|
DumpOpenFiles
|
2023-10-24 00:47:18 +02:00
|
|
|
DumpMapper
|
2018-01-12 17:30:54 +01:00
|
|
|
)
|
|
|
|
|
2023-10-03 13:56:17 +02:00
|
|
|
type dumpChoices struct{}
|
|
|
|
|
|
|
|
func (dumpChoices) Choices() []BitsChoicesInfo {
|
|
|
|
return []BitsChoicesInfo{
|
|
|
|
{uint64(DumpHeaders), "headers"},
|
|
|
|
{uint64(DumpBodies), "bodies"},
|
|
|
|
{uint64(DumpRequests), "requests"},
|
|
|
|
{uint64(DumpResponses), "responses"},
|
|
|
|
{uint64(DumpAuth), "auth"},
|
|
|
|
{uint64(DumpFilters), "filters"},
|
|
|
|
{uint64(DumpGoRoutines), "goroutines"},
|
|
|
|
{uint64(DumpOpenFiles), "openfiles"},
|
2023-10-24 00:47:18 +02:00
|
|
|
{uint64(DumpMapper), "mapper"},
|
2018-01-12 17:30:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-03 13:56:17 +02:00
|
|
|
func (dumpChoices) Type() string {
|
2019-02-07 12:57:26 +01:00
|
|
|
return "DumpFlags"
|
2018-01-12 17:30:54 +01:00
|
|
|
}
|
2020-12-11 18:48:09 +01:00
|
|
|
|
2023-10-03 13:56:17 +02:00
|
|
|
// DumpFlagsList is a list of dump flags used in the help
|
|
|
|
var DumpFlagsList = DumpHeaders.Help()
|