devlink

package module
v0.0.0-...-94b7996 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2019 License: MIT Imports: 5 Imported by: 0

README

Package devlink provides access to Linux's devlink interface.

For more information on devlink, please see https://lwn.net/Articles/674867/.

MIT Licensed.

Documentation

Overview

Package devlink provides access to Linux's devlink interface.

For more information on devlink, please see: https://lwn.net/Articles/674867/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

A Client provides access to Linux devlink information.

func New

func New() (*Client, error)

New creates a new Client.

func (*Client) Close

func (c *Client) Close() error

Close releases resources used by a Client.

func (*Client) Devices

func (c *Client) Devices() ([]*Device, error)

Devices retrieves all devlink devices on this system.

func (*Client) Ports

func (c *Client) Ports() ([]*Port, error)

Ports retrieves all devlink ports attached to devices on this system.

type Device

type Device struct {
	Bus    string
	Device string
}

A Device is a devlink device.

type Port

type Port struct {
	Bus    string
	Device string
	Port   int
	Type   PortType
	Name   string
}

A Port is a devlink port which is attached to a devlink device.

type PortType

type PortType int

A PortType is the operating mode of a devlink port.

const (
	Unknown PortType = iota
	Auto
	Ethernet
	InfiniBand
)

Possible PortType values.

func (PortType) String

func (i PortType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL