worker

package
Version: v0.0.0-...-0bc30a8 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigChannel

func ConfigChannel(key types.ConfigurationKey)

ConfigChannel sends a types.ConfigurationKey to the config channel

func Logger

func Logger(customLogger zerolog.Logger)

Logger makes it possible to use a custom logger interface

func SignalChannel

func SignalChannel(signal os.Signal)

SignalChannel sends a os.Signal to the signal channel

Types

type ConfdWorker

type ConfdWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewConfdWorker

func NewConfdWorker(workers []types.Worker) *ConfdWorker

func (*ConfdWorker) Logger

func (worker *ConfdWorker) Logger(logger zerolog.Logger)

func (ConfdWorker) Name

func (ConfdWorker) Name() types.WorkerName

func (*ConfdWorker) Run

func (worker *ConfdWorker) Run()

type DhcpClientWorker

type DhcpClientWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewDhcpClientWorker

func NewDhcpClientWorker(intf model.NetworkInterface) *DhcpClientWorker

func (*DhcpClientWorker) Logger

func (worker *DhcpClientWorker) Logger(logger zerolog.Logger)

func (DhcpClientWorker) Name

func (*DhcpClientWorker) Run

func (worker *DhcpClientWorker) Run()

type DhcpServerWorker

type DhcpServerWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewDhcpServerWorker

func NewDhcpServerWorker(networks model.Networks) *DhcpServerWorker

func (*DhcpServerWorker) Logger

func (worker *DhcpServerWorker) Logger(logger zerolog.Logger)

func (DhcpServerWorker) Name

func (*DhcpServerWorker) Run

func (worker *DhcpServerWorker) Run()

type DnsWorker

type DnsWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

DnsWorker is the DNS server running on the specified network interfaces

func NewDnsWorker

func NewDnsWorker(fallbackServer net.IP, records model.DnsRecords) *DnsWorker

NewDnsWorker will return a new instance of a DnsWorker. Setting network to nil will force the DNS server to listen on all interfaces. That should happen only once! In case the fallbackServer is nil 1.1.1.1 wil be used as default fallback server.

func (*DnsWorker) Logger

func (worker *DnsWorker) Logger(logger zerolog.Logger)

func (DnsWorker) Name

func (worker DnsWorker) Name() types.WorkerName

func (*DnsWorker) Run

func (worker *DnsWorker) Run()

type FrontendWorker

type FrontendWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewFrontendWorker

func NewFrontendWorker(directory string) *FrontendWorker

func (*FrontendWorker) Logger

func (worker *FrontendWorker) Logger(logger zerolog.Logger)

func (FrontendWorker) Name

func (*FrontendWorker) Run

func (worker *FrontendWorker) Run()

type HWDetectWorker

type HWDetectWorker struct {
	types.BaseWorker

	// in case we want to run the worker once
	Oneshot bool
	// contains filtered or unexported fields
}

func NewHWDetectWorker

func NewHWDetectWorker() *HWDetectWorker

func (*HWDetectWorker) Logger

func (worker *HWDetectWorker) Logger(logger zerolog.Logger)

func (HWDetectWorker) Name

func (*HWDetectWorker) Run

func (worker *HWDetectWorker) Run()

type IPTablesWorker

type IPTablesWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewIPTablesWorker

func NewIPTablesWorker(cpuCount int) *IPTablesWorker

func (*IPTablesWorker) Logger

func (worker *IPTablesWorker) Logger(logger zerolog.Logger)

func (IPTablesWorker) Name

func (*IPTablesWorker) Run

func (worker *IPTablesWorker) Run()

type NFQWorker

type NFQWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewNFQWorker

func NewNFQWorker(queueNum uint16) *NFQWorker

func (*NFQWorker) Logger

func (worker *NFQWorker) Logger(logger zerolog.Logger)

func (NFQWorker) Name

func (worker NFQWorker) Name() types.WorkerName

func (*NFQWorker) Run

func (worker *NFQWorker) Run()

type PortalWorker

type PortalWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewPortalWorker

func NewPortalWorker() *PortalWorker

func (*PortalWorker) Logger

func (worker *PortalWorker) Logger(logger zerolog.Logger)

func (PortalWorker) Name

func (PortalWorker) Name() types.WorkerName

func (*PortalWorker) Run

func (worker *PortalWorker) Run()

type ProfilerWorker

type ProfilerWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewProfilerWorker

func NewProfilerWorker() *ProfilerWorker

func (*ProfilerWorker) Logger

func (worker *ProfilerWorker) Logger(logger zerolog.Logger)

func (ProfilerWorker) Name

func (*ProfilerWorker) Run

func (worker *ProfilerWorker) Run()

type WatcherWorker

type WatcherWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

func NewWatcherWorker

func NewWatcherWorker(channel chan types.Worker, workers []types.Worker) *WatcherWorker

func (*WatcherWorker) HandleChannel

func (watcher *WatcherWorker) HandleChannel()

func (*WatcherWorker) Logger

func (worker *WatcherWorker) Logger(logger zerolog.Logger)

func (WatcherWorker) Name

func (worker WatcherWorker) Name() types.WorkerName

func (WatcherWorker) PrintMemUsage

func (worker WatcherWorker) PrintMemUsage()

func (*WatcherWorker) Run

func (watcher *WatcherWorker) Run()

type WifiAPWorker

type WifiAPWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

WifiAPWorker can create an access point. It has external dependencies: iw and hostapd. If one of the dependecies are missing the worker won't start.

func NewWifiAPWorker

func NewWifiAPWorker(apIfaceName string) *WifiAPWorker

func (WifiAPWorker) BlockedBy

func (WifiAPWorker) BlockedBy() []types.WorkerName

func (*WifiAPWorker) Logger

func (worker *WifiAPWorker) Logger(logger zerolog.Logger)

func (WifiAPWorker) Name

func (WifiAPWorker) Name() types.WorkerName

func (*WifiAPWorker) Run

func (worker *WifiAPWorker) Run()

type WifiSTAWorker

type WifiSTAWorker struct {
	types.BaseWorker
	// contains filtered or unexported fields
}

WifiSTAWorker can create an access point and/or client setup. It has external dependencies like iw, wpa_supplicant and hostapd. If one of the dependecies are missing the worker won't start and makerk the related feature as unavailable in the front-end.

func NewWifiSTAWorker

func NewWifiSTAWorker(staIfaceName string) *WifiSTAWorker

func (*WifiSTAWorker) Logger

func (worker *WifiSTAWorker) Logger(logger zerolog.Logger)

func (WifiSTAWorker) Name

func (*WifiSTAWorker) Run

func (worker *WifiSTAWorker) Run()

Jump to

Keyboard shortcuts

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