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