service

package
v0.0.0-...-2a5a317 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package service contains common facilities shared by all network managers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

type Handle struct {
	// ID is the the network manager identifier.
	ID string

	// IsManaging checks whether this network manager service is managing the
	// network interfaces.
	IsManaging func(context.Context, *Options) (bool, error)

	// Setup sets up the network interfaces.
	Setup func(context.Context, *Options) error

	// Rollback rolls back the changes created in Setup.
	Rollback func(context.Context, *Options) error
}

Handle is the interface implemented by the linux network managers.

type Options

type Options struct {
	// Data is a data pointer specific to the network manager.
	Data any
	// NicConfigs is the list of NIC configurations.
	NICConfigs []*nic.Configuration
}

Options contains the options for managing the network environment.

Jump to

Keyboard shortcuts

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