backend

package
v0.0.0-...-2269899 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {

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

Backend implements a netctl_back service.

func NewBackend

func NewBackend(addr string, opts ...ServerOption) (*Backend, error)

NewBackend returns a new netctl_back service.

func (*Backend) Close

func (b *Backend) Close() error

Close tears down the Backend.

func (*Backend) ForgetAllNetworks

ForgetAllNetworks deletes all saved networks for a given frontend.

func (*Backend) ForgetNetwork

ForgetNetwork deletes a network from the list of saved networks for a given frontend.

func (*Backend) GetSavedBearerConfs

GetSavedBearerConfs returns a list of cached bearer configs for a given frontend.

func (*Backend) GetSavedNetworks

GetSavedNetworks returns a list of cached network for a given frontend..

func (*Backend) GetSavedWired8021XConfs

GetSavedWired8021XConfs returns a list of cached wired 802.1x configs for a given frontend.

func (*Backend) SaveBearerConf

SaveBearerConf caches a bearer config provided by a frontend.

func (*Backend) SaveNetwork

func (b *Backend) SaveNetwork(ctx context.Context, r *api.SaveNetworkRequest) (*api.SaveNetworkReply, error)

SaveNetwork caches a network provided by a frontend.

func (*Backend) SaveWired8021XConf

SaveWired8021XConf caches a wired 802.1x config provided by a frontend.

func (*Backend) Serve

func (b *Backend) Serve() error

Serve starts the netctl back service.

type ServerOption

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

ServerOption is used to configure a netctl backend.

func WithDBusProxies

func WithDBusProxies() ServerOption

WithDBusProxies tells the backend to use DBus for UI proxies.

func WithDatabasePath

func WithDatabasePath(path string) ServerOption

WithDatabasePath specifies the database path to use. If this is not specified, a default path is used.

func WithLocalListener

func WithLocalListener(addr string) ServerOption

WithLocalListener tells the backend to listen on a local address to provide a convenient default for local clients like the netctl CLI.

func WithNoDatabase

func WithNoDatabase() ServerOption

WithNoDatabase tells the backend to start without a database.

Jump to

Keyboard shortcuts

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