drivers

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Overview

Package drivers contains methods to download and install drivers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChecksumDriver

func ChecksumDriver(ctx context.Context, driverVersion string) (string, error)

ChecksumDriver downloads and returns the SHA265 checksum of the driver.

func DownloadDriver

func DownloadDriver(ctx context.Context, driverVersion string) (io.ReadCloser, error)

DownloadDriver downloads the requested driver and returns the binary as a []byte so it can be checked before written to disk.

func ListSupportedDrivers

func ListSupportedDrivers(outfile string) error

ListSupportedDrivers prints the driver to stderr in a format that can be consumed by the Makefile to iterate tests across drivers.

Types

type Installer

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

Installer handles the logic to install drivers.

func NewInstaller

func NewInstaller(requestedVersion string, latest bool) (*Installer, error)

NewInstaller returns a driver installer instance.

func (*Installer) MaybeInstall

func (i *Installer) MaybeInstall(ctx context.Context) error

MaybeInstall installs a driver if 1) no driver is present on the system already or 2) the driver currently installed does not match the requested version.

Jump to

Keyboard shortcuts

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