btfhubonline

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = "0.1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BTFRecordIdentifier

type BTFRecordIdentifier struct {
	Distribution        string `json:"distribution"`
	DistributionVersion string `json:"distribution_version"`
	KernelVersion       string `json:"kernel_version"`
	Arch                string `json:"arch"`
}

BTFRecordIdentifier holds the 4 identifiers of a specific BTF file.

func (BTFRecordIdentifier) AsMap

func (identifier BTFRecordIdentifier) AsMap() map[string]string

type Client

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

Client exposes all API available in the BTFHub online server.

func New

func New(serverAddress string) (Client, error)

New initiates a new instance of BTFHub online client.

func (Client) GetCustomBTF

func (client Client) GetCustomBTF(btfIdentifier BTFRecordIdentifier, bpfBinary []byte) ([]byte, error)

GetCustomBTF returns a BTF from the server with customizing it for a specific BPF.

func (Client) GetRawBTF

func (client Client) GetRawBTF(btfIdentifier BTFRecordIdentifier) ([]byte, error)

GetRawBTF returns a BTF from the server without customizing it for a specific BPF.

func (Client) List

func (client Client) List() ([]BTFRecordIdentifier, error)

List returns a list of BTFRecordIdentifier objects that exist in the server.

Jump to

Keyboard shortcuts

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