frontend

package
Version: v0.0.0-...-e17d896 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterfaceType

func InterfaceType(ifname string) (api.InterfaceType, error)

InterfaceType returns the type of network interface, specified by name. An error is returned if the interface does not exist, or is not of valid type.

Types

type ModemFrontend

type ModemFrontend struct {
	// This is now required by protoc-gen-go-grpc, in order
	// to guarantee forward compatibility when an RPC is added.
	api.UnimplementedNetctlFrontServer
	// contains filtered or unexported fields
}

ModemFrontend is a netctl frontend that is linked to a modem.

func NewModemFrontend

func NewModemFrontend(mpath string, addr string) (*ModemFrontend, error)

NewModemFrontend returns a new netctl frontend for a modem.

func (*ModemFrontend) Close

func (mf *ModemFrontend) Close() error

Close tears down the ModemFrontend

func (*ModemFrontend) Initialize

func (mf *ModemFrontend) Initialize(nb *metadata.BackendMetaData, timeout time.Duration) error

Initialize starts the initialization phase and performs startup actions.

func (*ModemFrontend) ModemConnect

func (*ModemFrontend) ModemDisconnect

func (*ModemFrontend) ModemGetProperties

func (*ModemFrontend) Serve

func (mf *ModemFrontend) Serve() error

Serve starts the wireless frontend service.

type WirelessFrontend

type WirelessFrontend struct {
	// This is now required by protoc-gen-go-grpc, in order
	// to guarantee forward compatibility when an RPC is added.
	api.UnimplementedNetctlFrontServer
	// contains filtered or unexported fields
}

WirelessFrontend is a netctl frontend that is linked to a wireless interface.

func NewWirelessFrontend

func NewWirelessFrontend(ifname, addr string, opts ...WirelessOption) (*WirelessFrontend, error)

NewWirelessFrontend returns a new netctl frontend for a wireless interface.

func (*WirelessFrontend) Close

func (wf *WirelessFrontend) Close() error

Close tears down the WirelessFrontend

func (*WirelessFrontend) DisableInterface

InterfaceDisable disables the network interface controlled by the frontend.

func (*WirelessFrontend) EnableInterface

InterfaceEnable enables the network interface controlled by the frontend.

func (*WirelessFrontend) Initialize

func (wf *WirelessFrontend) Initialize(nb *metadata.BackendMetaData, timeout time.Duration) error

Initialize starts the initialization phase and performs startup actions.

func (*WirelessFrontend) Serve

func (wf *WirelessFrontend) Serve() error

Serve starts the wireless frontend service.

func (*WirelessFrontend) WirelessConnect

WirelessConnect connects to a wireless network.

func (*WirelessFrontend) WirelessDisconnect

WirelessDisconnect disconnects a wireless network.

func (*WirelessFrontend) WirelessGetProperties

WirelessGetProperties returns the current properties of the wireless frontend.

func (*WirelessFrontend) WirelessMonitorProperties

WirelessMonitorProperties handles a stream of wireless properties updates.

type WirelessOption

type WirelessOption interface {
	// contains filtered or unexported methods
}

WirelessOption is used to configure a netctl frontend.

func WithConnectLastNetwork

func WithConnectLastNetwork() WirelessOption

WithConnectLastNetwork tells the Service to try to connect to the last known network on startup.

func WithManagerOptions

func WithManagerOptions(mopts ...wireless.ManagerOption) WirelessOption

WithManagerOptions specifies a list of wireless.ManagerOptions that the frontend should used when constructing its wireless.Manager.

func WithRememberNetworks

func WithRememberNetworks() WirelessOption

WithRememberNetworks tells the Service to cache network configurations.

func WithUUID

func WithUUID() WirelessOption

WithUUID tells the frontend to use a UUID as its identifier with the backend. By default, the frontend is identified by its interface name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL