Documentation ¶
Index ¶
Constants ¶
View Source
const ContentTypeJSON = "application/json"
ContentTypeJSON holds the HTML content-type of a JSON payload
View Source
const ContentTypeProtobuf = "application/protobuf"
ContentTypeProtobuf holds the HTML content-type of a Protobuf payload
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Marshaler ¶
type Marshaler interface { Marshal(stats map[int32]*procutil.StatsWithPerm) ([]byte, error) ContentType() string }
Marshaler is an interface implemented by all stats serializers
func GetMarshaler ¶
GetMarshaler returns the appropriate Marshaler based on the given accept header
type Unmarshaler ¶
type Unmarshaler interface {
Unmarshal([]byte) (*model.ProcStatsWithPermByPID, error)
}
Unmarshaler is an interface implemented by all process stats deserializers
func GetUnmarshaler ¶
func GetUnmarshaler(ctype string) Unmarshaler
GetUnmarshaler returns the appropriate Unmarshaler based on the given content type
Click to show internal directories.
Click to hide internal directories.