sights

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildSight

type BuildSight interface {
	Init(context.Context) error
	Deinit(context.Context) error
	Run(context.Context) error
}

func BuildSightNew

func BuildSightNew(_ context.Context, cfg *BuildSightConfig) BuildSight

type BuildSightConfig

type BuildSightConfig struct {
	Config config.Config
	Logger hclog.Logger
	Gpt    gpt.Gpt
	Repo   repo.Repo
	Review review.Review
}

func DefaultBuildSightConfig

func DefaultBuildSightConfig() *BuildSightConfig

type CgroupDocker added in v0.5.0

type CgroupDocker struct {
	ContainerId string
	Name        string
	Image       string
	Status      string
	Running     bool
}

type CgroupMem added in v0.5.0

type CgroupMem struct {
	Cache              uint64
	Rss                uint64
	RssHuge            uint64
	MappedFile         uint64
	TotalCache         uint64
	TotalRss           uint64
	TotalRssHuge       uint64
	TotalMappedFile    uint64
	MemUsageInBytes    uint64
	MemMaxUsageInBytes uint64
	MemLimitInBytes    uint64
}

type CodeSight

type CodeSight interface {
	Init(context.Context) error
	Deinit(context.Context) error
	Run(context.Context) error
}

func CodeSightNew

func CodeSightNew(_ context.Context, cfg *CodeSightConfig) CodeSight

type CodeSightConfig

type CodeSightConfig struct {
	Config config.Config
	Logger hclog.Logger
	Gpt    gpt.Gpt
	Repo   repo.Repo
	Review review.Review
}

func DefaultCodeSightConfig

func DefaultCodeSightConfig() *CodeSightConfig

type CpuStat added in v0.5.0

type CpuStat struct {
	PhysicalCount int64
	LogicalCount  int64
	CpuPercents   []float64
	CpuTimes      []CpuTime
}

type CpuTime added in v0.5.0

type CpuTime struct {
	Cpu       string
	User      float64
	System    float64
	Idle      float64
	Nice      float64
	Iowait    float64
	Irq       float64
	Softirq   float64
	Steal     float64
	Guest     float64
	GuestNice float64
}

type DiskPartition added in v0.5.0

type DiskPartition struct {
	Device string
	Mount  string
	Fstype string
}

type DiskStat added in v0.5.0

type DiskStat struct {
	DiskPartitions []DiskPartition
	DiskUsages     []DiskUsage
}

type DiskUsage added in v0.5.0

type DiskUsage struct {
	Path        string
	Fstype      string
	Total       uint64
	Free        uint64
	Used        uint64
	UsedPercent float64
}

type DockerStat added in v0.5.0

type DockerStat struct {
	ContainerIds          []string
	CgroupCpuDockerUsages []float64
	CgroupCpuUsages       []float64
	CgroupDockers         []CgroupDocker
	CgroupMems            []CgroupMem
}

type HostStat added in v0.5.0

type HostStat struct {
	Hostname        string
	Procs           uint64
	Os              string
	Platform        string
	PlatformFamily  string
	PlatformVersion string
	KernelVersion   string
	KernelArch      string
	HostID          string
}

type LoadAvg added in v0.5.0

type LoadAvg struct {
	Load1  float64
	Load5  float64
	Load15 float64
}

type LoadMisc added in v0.5.0

type LoadMisc struct {
	ProcsTotal   int64
	ProcsCreated int64
	ProcsRunning int64
	ProcsBlocked int64
	Ctxt         int64
}

type LoadStat added in v0.5.0

type LoadStat struct {
	LoadAvg  LoadAvg
	LoadMisc LoadMisc
}

type MemStat added in v0.5.0

type MemStat struct {
	MemSwapDevices []MemSwapDevice
	MemSwapMemory  MemSwapMemory
	MemVirtual     MemVirtual
}

type MemSwapDevice added in v0.5.0

type MemSwapDevice struct {
	Name      string
	UsedBytes uint64
	FreeBytes uint64
}

type MemSwapMemory added in v0.5.0

type MemSwapMemory struct {
	Total       uint64
	Used        uint64
	Free        uint64
	UsedPercent float64
}

type MemVirtual added in v0.5.0

type MemVirtual struct {
	Total          uint64
	Available      uint64
	Used           uint64
	UsedPercent    float64
	Free           uint64
	Buffer         uint64
	Cached         uint64
	SwapCached     uint64
	SwapTotal      uint64
	SwapFree       uint64
	Mapped         uint64
	VmallocTotal   uint64
	VmallocUsed    uint64
	VmallocChunk   uint64
	HugePagesTotal uint64
	HugePagesFree  uint64
	HugePagesRsvd  uint64
	HugePagesSurp  uint64
	HugePageSize   uint64
	AnonHugePage   uint64
}

type NetInterface added in v0.5.0

type NetInterface struct {
	Index        int64
	Mtu          int64
	Name         string
	HardwareAddr string
	Flags        []string
	Addrs        []string
}

type NetIo added in v0.5.0

type NetIo struct {
	Name        string
	BytesSent   uint64
	BytesRecv   uint64
	PacketsSent uint64
	PacketsRecv uint64
}

type NetStat added in v0.5.0

type NetStat struct {
	NetIos        []NetIo
	NetInterfaces []NetInterface
}

type NodeInfo added in v0.5.0

type NodeInfo struct {
	NodeStat   NodeStat
	NodeReport NodeReport
}

type NodeReport added in v0.5.0

type NodeReport struct {
	Host          string
	CpuReport     string
	DiskReport    string
	DockerReport  string
	HostReport    string
	LoadReport    string
	MemReport     string
	NetReport     string
	ProcessReport string
}

type NodeSight added in v0.5.0

type NodeSight interface {
	Init(context.Context) error
	Deinit(context.Context) error
	Run(context.Context) (NodeInfo, error)
}

func NodeSightNew added in v0.5.0

func NodeSightNew(_ context.Context, cfg *NodeSightConfig) NodeSight

type NodeSightConfig added in v0.5.0

type NodeSightConfig struct {
	Config config.Config
	Logger hclog.Logger
	Gpt    gpt.Gpt
	Ssh    ssh.Ssh
}

func DefaultNodeSightConfig added in v0.5.0

func DefaultNodeSightConfig() *NodeSightConfig

type NodeStat added in v0.5.0

type NodeStat struct {
	Host        string
	CpuStat     CpuStat
	DiskStat    DiskStat
	DockerStat  DockerStat
	HostStat    HostStat
	LoadStat    LoadStat
	MemStat     MemStat
	NetStat     NetStat
	ProcessStat ProcessStat
}

type ProcessInfo added in v0.5.0

type ProcessInfo struct {
	Background        bool
	CpuPercent        float64
	Children          []int32
	Cmdline           string
	Environs          []string
	Ionice            int32
	IsRunning         bool
	ProcessMemoryInfo ProcessMemoryInfo
	MemoryPercent     float32
	Name              string
	NumFd             int32
	NumThread         int32
	Parent            int32
	Percent           float64
	Ppid              int32
	ProcessRlimits    []ProcessRlimit
	Statuss           []string
	Uids              []int32
	Username          string
}

type ProcessMemoryInfo added in v0.5.0

type ProcessMemoryInfo struct {
	Rss    uint64
	Vms    uint64
	Hwm    uint64
	Data   uint64
	Stack  uint64
	Locked uint64
	Swap   uint64
}

type ProcessRlimit added in v0.5.0

type ProcessRlimit struct {
	Resource int32
	Soft     uint64
	Hard     uint64
	Used     uint64
}

type ProcessStat added in v0.5.0

type ProcessStat struct {
	ProcessInfos []ProcessInfo
}

Jump to

Keyboard shortcuts

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