host

package
v0.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Disk

type Disk struct {
	Redactions []*redact.Redact `json:"redactions"`
}

func NewDisk

func NewDisk(redactions []*redact.Redact) *Disk

func (Disk) ID

func (d Disk) ID() string

func (Disk) Run

func (d Disk) Run() op.Op

type EtcHosts

type EtcHosts struct {
	OS         string           `json:"os"`
	Redactions []*redact.Redact `json:"redactions"`
}

func NewEtcHosts

func NewEtcHosts(redactions []*redact.Redact) *EtcHosts

func (EtcHosts) ID

func (r EtcHosts) ID() string

func (EtcHosts) Run

func (r EtcHosts) Run() op.Op

type FSTab

type FSTab struct {
	OS      string        `json:"os"`
	Sheller runner.Runner `json:"sheller"`
}

func NewFSTab

func NewFSTab(os string, redactions []*redact.Redact) *FSTab

func (FSTab) ID

func (r FSTab) ID() string

func (FSTab) Run

func (r FSTab) Run() op.Op

type Get

type Get struct {
	Path       string           `json:"path"`
	Redactions []*redact.Redact `json:"redactions"`
}

func NewGetter

func NewGetter(path string, redactions []*redact.Redact) *Get

func (Get) ID

func (g Get) ID() string

func (Get) Run

func (g Get) Run() op.Op

type IPTables

type IPTables struct {
	Commands   []string         `json:"commands"`
	Redactions []*redact.Redact `json:"redactions"`
}

func NewIPTables

func NewIPTables(redactions []*redact.Redact) *IPTables

NewIPTables returns a runner configured to run several iptables commands

func (IPTables) ID

func (r IPTables) ID() string

func (IPTables) Run

func (r IPTables) Run() op.Op

type Info

type Info struct {
	Redactions []*redact.Redact `json:"redactions"`
}

func NewInfo

func NewInfo(redactions []*redact.Redact) *Info

func (Info) ID

func (i Info) ID() string

func (Info) Run

func (i Info) Run() op.Op

type InfoStat

type InfoStat struct {
	Hostname             string `json:"hostname"`
	OS                   string `json:"os"`
	Platform             string `json:"platform"`
	PlatformFamily       string `json:"platformFamily"`
	PlatformVersion      string `json:"platformVersion"`
	KernelVersion        string `json:"kernelVersion"`
	KernelArch           string `json:"kernelArch"`
	VirtualizationSystem string `json:"virtualizationSystem"`
	VirtualizationRole   string `json:"virtualizationRole"`
	HostID               string `json:"hostId"`

	Uptime   uint64 `json:"uptime"`
	BootTime uint64 `json:"bootTime"`
	Procs    uint64 `json:"procs"`
}

InfoStat includes general information about the Host. It serves as the basis for the results produced by the Info runner.

type Memory

type Memory struct{}

func (Memory) ID

func (m Memory) ID() string

func (Memory) Run

func (m Memory) Run() op.Op

Run calls out to mem.VirtualMemory

type Network

type Network struct {
	Redactions []*redact.Redact
}

func NewNetwork

func NewNetwork(redactions []*redact.Redact) *Network

func (Network) ID

func (n Network) ID() string

func (Network) Run

func (n Network) Run() op.Op

type NetworkInterface

type NetworkInterface struct {
	Index int      `json:"index"`
	MTU   int      `json:"mtu"`
	Name  string   `json:"name"`
	Flags []string `json:"flags"`
	Addrs []string `json:"addrs"`
}

NetworkInterface represents details about a network interface. This serves as the basis for the results produced by the Network runner.

type OS

type OS struct {
	OS         string           `json:"os"`
	Command    string           `json:"command"`
	Redactions []*redact.Redact `json:"redactions"`
}

func NewOS

func NewOS(os string, redactions []*redact.Redact) *OS

func (OS) ID

func (o OS) ID() string

func (OS) Run

func (o OS) Run() op.Op

Run calls the given OS utility to get information on the operating system

type Partition

type Partition struct {
	Device     string   `json:"device"`
	Mountpoint string   `json:"mountpoint"`
	Fstype     string   `json:"fstype"`
	Opts       []string `json:"opts"`
}

Partition includes details about a disk partition. This serves as the basis for the results produced by the Disk runner.

type Proc

type Proc struct {
	Name string `json:"name"`
	PID  int    `json:"pid"`
	PPID int    `json:"ppid"`
}

Proc represents the process data we're collecting and returning

type ProcFile

type ProcFile struct {
	OS         string           `json:"os"`
	Commands   []string         `json:"commands"`
	Redactions []*redact.Redact `json:"redactions"`
}

func NewProcFile

func NewProcFile(os string, redactions []*redact.Redact) *ProcFile

func (ProcFile) ID

func (p ProcFile) ID() string

func (ProcFile) Run

func (p ProcFile) Run() op.Op

type Process

type Process struct {
	Redactions []*redact.Redact `json:"redactions"`
}

Process represents a single OS Process

func NewProcess

func NewProcess(redactions []*redact.Redact) *Process

func (Process) ID

func (p Process) ID() string

func (Process) Run

func (p Process) Run() op.Op

Jump to

Keyboard shortcuts

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