Documentation
¶
Index ¶
- type Command
- type CommandEthtool
- func (c *CommandEthtool) DriverName(intf NamespacedInterface) (driver string, err error)
- func (c *CommandEthtool) Get(intf NamespacedInterface) (stats map[string]uint64, err error)
- func (c *CommandEthtool) Init() error
- func (c *CommandEthtool) Interfaces(includeNamespaces bool) ([]NamespacedInterface, error)
- func (c *CommandEthtool) Stats(intf NamespacedInterface) (stats map[string]uint64, err error)
- type Ethtool
- type Namespace
- type NamespaceGoroutine
- func (n *NamespaceGoroutine) Do(f func(*NamespaceGoroutine) (interface{}, error)) (interface{}, error)
- func (n *NamespaceGoroutine) DriverName(intf NamespacedInterface) (string, error)
- func (n *NamespaceGoroutine) Get(intf NamespacedInterface) (map[string]uint64, error)
- func (n *NamespaceGoroutine) Interfaces() ([]NamespacedInterface, error)
- func (n *NamespaceGoroutine) Name() string
- func (n *NamespaceGoroutine) Start() error
- func (n *NamespaceGoroutine) Stats(intf NamespacedInterface) (map[string]uint64, error)
- type NamespacedAction
- type NamespacedInterface
- type NamespacedResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
Init() error
DriverName(intf NamespacedInterface) (string, error)
Interfaces(includeNamespaces bool) ([]NamespacedInterface, error)
Stats(intf NamespacedInterface) (map[string]uint64, error)
Get(intf NamespacedInterface) (map[string]uint64, error)
}
type CommandEthtool ¶
func NewCommandEthtool ¶
func NewCommandEthtool() *CommandEthtool
func (*CommandEthtool) DriverName ¶
func (c *CommandEthtool) DriverName(intf NamespacedInterface) (driver string, err error)
func (*CommandEthtool) Get ¶ added in v1.26.0
func (c *CommandEthtool) Get(intf NamespacedInterface) (stats map[string]uint64, err error)
func (*CommandEthtool) Init ¶
func (c *CommandEthtool) Init() error
func (*CommandEthtool) Interfaces ¶
func (c *CommandEthtool) Interfaces(includeNamespaces bool) ([]NamespacedInterface, error)
func (*CommandEthtool) Stats ¶
func (c *CommandEthtool) Stats(intf NamespacedInterface) (stats map[string]uint64, err error)
type Ethtool ¶
type Ethtool struct {
// This is the list of interface names to include
InterfaceInclude []string `toml:"interface_include"`
// This is the list of interface names to ignore
InterfaceExclude []string `toml:"interface_exclude"`
// Behavior regarding metrics for downed interfaces
DownInterfaces string `toml:" down_interfaces"`
// This is the list of namespace names to include
NamespaceInclude []string `toml:"namespace_include"`
// This is the list of namespace names to ignore
NamespaceExclude []string `toml:"namespace_exclude"`
// Normalization on the key names
NormalizeKeys []string `toml:"normalize_keys"`
Log telegraf.Logger `toml:"-"`
// contains filtered or unexported fields
}
func (*Ethtool) SampleConfig ¶
type Namespace ¶ added in v1.25.0
type Namespace interface {
Name() string
Interfaces() ([]NamespacedInterface, error)
DriverName(intf NamespacedInterface) (string, error)
Stats(intf NamespacedInterface) (map[string]uint64, error)
Get(intf NamespacedInterface) (map[string]uint64, error)
}
type NamespaceGoroutine ¶ added in v1.25.0
func (*NamespaceGoroutine) Do ¶ added in v1.25.0
func (n *NamespaceGoroutine) Do(f func(*NamespaceGoroutine) (interface{}, error)) (interface{}, error)
Do runs a function inside the OS thread tied to the namespace.
func (*NamespaceGoroutine) DriverName ¶ added in v1.25.0
func (n *NamespaceGoroutine) DriverName(intf NamespacedInterface) (string, error)
func (*NamespaceGoroutine) Get ¶ added in v1.26.0
func (n *NamespaceGoroutine) Get(intf NamespacedInterface) (map[string]uint64, error)
func (*NamespaceGoroutine) Interfaces ¶ added in v1.25.0
func (n *NamespaceGoroutine) Interfaces() ([]NamespacedInterface, error)
func (*NamespaceGoroutine) Name ¶ added in v1.25.0
func (n *NamespaceGoroutine) Name() string
func (*NamespaceGoroutine) Start ¶ added in v1.25.0
func (n *NamespaceGoroutine) Start() error
Start locks a goroutine to an OS thread and ties it to the namespace, then loops for actions to run in the namespace.
func (*NamespaceGoroutine) Stats ¶ added in v1.25.0
func (n *NamespaceGoroutine) Stats(intf NamespacedInterface) (map[string]uint64, error)
type NamespacedAction ¶ added in v1.25.0
type NamespacedAction struct {
// contains filtered or unexported fields
}
type NamespacedInterface ¶ added in v1.25.0
type NamespacedResult ¶ added in v1.25.0
type NamespacedResult struct {
Result interface{}
Error error
}
Click to show internal directories.
Click to hide internal directories.