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