wui

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Copyright 2024 David Hallum. All rights reserved. Use of this source code is governed by a MIT license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EChartPoint

type EChartPoint []interface{}

type MasonReader added in v0.2.0

type MasonReader interface {
	ListNetworks(context.Context) []model.Network
	CountNetworks(context.Context) int
	ListDevices(context.Context) []model.Device
	CountDevices(context.Context) int
	GetDeviceByAddr(context.Context, model.Addr) (model.Device, error)
	ReadPerformancePings(
		context.Context,
		model.Device,
		time.Duration,
	) ([]pinger.Point, error)
	GetConfig() *server.Config
	GetInternalsSnapshot(ctx context.Context) server.MasonInternalsView
	GetUserAgent() string
	OuiLookup(mac net.HardwareAddr) string
	GetNetworkStats(ctx context.Context) []model.NetworkStats
	PingFailures(ctx context.Context) []model.Device
	ServerDevices(ctx context.Context) []model.Device
	FlowSummaryByIP(context.Context, model.Addr) ([]model.FlowSummaryForAddrByIP, error)
	FlowSummaryByName(context.Context, model.Addr) ([]model.FlowSummaryForAddrByName, error)
	FlowSummaryByCountry(context.Context, model.Addr) ([]model.FlowSummaryForAddrByCountry, error)
	LookupIP(model.Addr) string
}

type MasonReaderWriter added in v0.2.0

type MasonReaderWriter interface {
	MasonReader
	MasonWriter
	MasonNetworker
}

type MasonWriter added in v0.2.0

type MasonWriter interface {
	AddNetwork(context.Context, model.Network) error
	AddNetworkByName(context.Context, string, string, bool) error
}

type WUI

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

WUI is responsible for the Web UI when running in server mode

func New

func New(m MasonReaderWriter, listenaddress string) *WUI

func (*WUI) Shutdown

func (w *WUI) Shutdown(ctx context.Context) error

func (*WUI) Start

func (w *WUI) Start() error

Jump to

Keyboard shortcuts

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