Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metric ¶
type Resolver ¶
type Resolver interface {
// ResolveHostFS Resolves a path based on a user-set HostFS flag, in cases where a user wants to monitor an alternate filesystem root
// If no user root has been set, it will return the input string
ResolveHostFS(string) string
// IsSet returns true if the user has set an alternate filesystem root
IsSet() bool
// Join emulates the behavior of filepath.join
Join(...string) string
}
Resolver is an interface for HostFS resolvers. This is meant to be generic and (hopefully) future-proof way of dealing with a user-supplied root filesystem path. A resolver-style function serves two ends: 1) if we attempt to stop consumers from merely "saving off" a string, the underlying implementation can update hostfs values and pass the new paths along to consumers 2) This stops different bits of code from making different assumptions about what's in hostfs and otherwise treating the concept differently. It's easy to mix up "hostfs" and "procfs" and "sysfs" as concepts. A single resolver forces this logic to be a little more centralized.
type SocketStats ¶
type SocketStats struct {
TcpConns uint `json:"connections,omitempty"`
TcpListening uint `json:"listening,omitempty"`
TcpClosewait uint `json:"close_wait,omitempty"`
TcpEstablished uint `json:"established,omitempty"`
TcpTimewait uint `json:"time_wait,omitempty"`
TcpSynsent uint `json:"sync_sent,omitempty"`
TcpSynrecv uint `json:"sync_recv,omitempty"`
TcpFinwait1 uint `json:"fin_wait1,omitempty"`
TcpFinwait2 uint `json:"fin_wait2,omitempty"`
TcpLastack uint `json:"last_ack,omitempty"`
TcpClosing uint `json:"closing,omitempty"`
}