Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SwitchToAdminMode ¶
func SwitchToDefaultMode ¶
Types ¶
type MasonNetworker ¶ added in v0.2.0
type MasonNetworker interface {
StringToAddr(string) (model.Addr, error)
IcmpPingAddr(
context.Context,
model.Addr,
int,
time.Duration,
bool,
) (nettools.Icmp4EchoResponseStatistics, error)
IcmpPing(
context.Context,
string,
int,
time.Duration,
bool,
) (nettools.Icmp4EchoResponseStatistics, error)
ArpPing(context.Context, string, time.Duration) (model.MAC, error)
Portscan(context.Context, string, *enrichment.PortScanConfig) ([]int, error)
GetExternalAddr(ctx context.Context) (model.Addr, error)
Traceroute(context.Context, string) ([]nettools.Icmp4EchoResponseStatistics, error)
TracerouteAddr(
context.Context,
model.Addr,
) ([]nettools.Icmp4EchoResponseStatistics, error)
FetchTLSInfo(context.Context, string) (nettools.TLS, error)
FetchSNMPInfo(context.Context, string) (nettools.SnmpInfo, error)
FetchSNMPInfoAddr(context.Context, model.Addr) (nettools.SnmpInfo, error)
}
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() *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 SwitchToAdminModeMsg ¶
type SwitchToAdminModeMsg struct{}
type SwitchToDefaultModeMsg ¶
type SwitchToDefaultModeMsg struct{}
type Tui ¶
type Tui struct {
// contains filtered or unexported fields
}
func New ¶
func New(m MasonReaderWriter) *Tui
func (*Tui) TeaHandler ¶
type TuiNetworksModel ¶
type TuiNetworksModel struct {
// contains filtered or unexported fields
}
func (TuiNetworksModel) Init ¶
func (nm TuiNetworksModel) Init() tea.Cmd
func (TuiNetworksModel) View ¶
func (nm TuiNetworksModel) View() string
Click to show internal directories.
Click to hide internal directories.