Skip to content

Commit

Permalink
Add missing godoc comments for xfrm stats (prometheus#433)
Browse files Browse the repository at this point in the history
Add missing godoc comments matching the kernel documentation, see
https://www.kernel.org/doc/html/latest/networking/xfrm_proc.html

Also rename the `xfrm*.go` files to have a `net_` prefix, as the
respective file is found in the `net/` sub-directory and this matches
filenames for other network-related stats.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
  • Loading branch information
tklauser committed Jan 26, 2022
1 parent 3f5987f commit 0bb82cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions xfrm.go → net_xfrm.go
Expand Up @@ -79,10 +79,13 @@ type XfrmStat struct {
// Policy is dead
XfrmOutPolDead int
// Policy Error
XfrmOutPolError int
XfrmFwdHdrError int
XfrmOutPolError int
// Forward routing of a packet is not allowed
XfrmFwdHdrError int
// State is invalid, perhaps expired
XfrmOutStateInvalid int
XfrmAcquireError int
// State hasn’t been fully acquired before use
XfrmAcquireError int
}

// NewXfrmStat reads the xfrm_stat statistics.
Expand Down
File renamed without changes.

0 comments on commit 0bb82cb

Please sign in to comment.