Documentation
¶
Index ¶
- Constants
- Variables
- func Build(cfg *Config, cli ContainerClient) error
- func NetstatCMD(p NetProto) []string
- func ParseNetstat(r io.Reader, cb func(*Connection)) (err error)
- type Builder
- type Compressor
- type Config
- type ConnGroup
- type Connection
- type Container
- func (c *Container) AddConnection(conn *Connection)
- func (c *Container) AddMany(conns []*Connection)
- func (c *Container) ConnectionsCount() (rv int)
- func (c *Container) IterListeners(it func(*Connection))
- func (c *Container) IterOutbounds(it func(*Connection))
- func (c *Container) SortConnections()
- func (c *Container) ToNode() (rv *node.Node)
- type ContainerClient
- type ContainerInfo
- type Enricher
- type Loader
- type MetaLoader
- type NamedBuilderWriter
- type NamedWriter
- type NetProto
- type OrphansInspector
- type VolumeInfo
Constants ¶
View Source
const ( ProcessRemote = "[remote]" ProcessUnknown = "[unknown]" )
Variables ¶
View Source
var ErrNotEnough = errors.New("not enough items")
Functions ¶
func Build ¶
func Build( cfg *Config, cli ContainerClient, ) error
func NetstatCMD ¶
func ParseNetstat ¶
func ParseNetstat(r io.Reader, cb func(*Connection)) (err error)
Types ¶
type Compressor ¶
type Compressor struct {
// contains filtered or unexported fields
}
func NewCompressor ¶
func NewCompressor( bldr NamedBuilderWriter, group string, diff int, force bool, ) *Compressor
func (*Compressor) AddEdge ¶
func (c *Compressor) AddEdge(e *node.Edge)
func (*Compressor) Name ¶
func (c *Compressor) Name() string
type Config ¶
type Config struct {
Builder Builder
Meta Enricher
Follow set.Unordered[string]
SkipEnv []string
Proto NetProto
OnlyLocal bool
NoLoops bool
Deep bool
}
func (*Config) MatchProto ¶
type ConnGroup ¶
type ConnGroup struct {
// contains filtered or unexported fields
}
func (*ConnGroup) AddListener ¶
func (cg *ConnGroup) AddListener(c *Connection)
func (*ConnGroup) AddOutbound ¶
func (cg *ConnGroup) AddOutbound(c *Connection)
func (*ConnGroup) IterListeners ¶
func (cg *ConnGroup) IterListeners(it func(*Connection))
func (*ConnGroup) IterOutbounds ¶
func (cg *ConnGroup) IterOutbounds(it func(*Connection))
type Connection ¶
type Connection struct {
Process string
DstID string
Path string
SrcIP net.IP
DstIP net.IP
Inode uint64
SrcPort int
DstPort int
Proto NetProto
Listen bool
}
func (*Connection) IsInbound ¶
func (c *Connection) IsInbound() bool
func (*Connection) IsListener ¶
func (c *Connection) IsListener() bool
func (*Connection) IsLocal ¶
func (c *Connection) IsLocal() bool
func (*Connection) UniqID ¶
func (c *Connection) UniqID() (id uint64, ok bool)
type Container ¶
type Container struct {
Endpoints map[string]string
Labels map[string]string
ID string
Name string
Image string
Info *ContainerInfo
Volumes []*VolumeInfo
// contains filtered or unexported fields
}
func (*Container) AddConnection ¶
func (c *Container) AddConnection(conn *Connection)
func (*Container) AddMany ¶
func (c *Container) AddMany(conns []*Connection)
func (*Container) ConnectionsCount ¶
func (*Container) IterListeners ¶
func (c *Container) IterListeners(it func(*Connection))
func (*Container) IterOutbounds ¶
func (c *Container) IterOutbounds(it func(*Connection))
func (*Container) SortConnections ¶
func (c *Container) SortConnections()
type ContainerClient ¶
type ContainerInfo ¶
type MetaLoader ¶
type MetaLoader struct {
// contains filtered or unexported fields
}
func NewMetaLoader ¶
func NewMetaLoader() *MetaLoader
func (*MetaLoader) Enrich ¶
func (ex *MetaLoader) Enrich(n *node.Node)
func (*MetaLoader) FromReader ¶
func (ex *MetaLoader) FromReader(r io.Reader) error
type NamedBuilderWriter ¶
type NamedBuilderWriter interface {
Builder
NamedWriter
}
type OrphansInspector ¶
type OrphansInspector struct {
// contains filtered or unexported fields
}
func NewOrphansInspector ¶
func NewOrphansInspector(b NamedBuilderWriter) *OrphansInspector
func (*OrphansInspector) AddEdge ¶
func (o *OrphansInspector) AddEdge(e *node.Edge)
func (*OrphansInspector) Name ¶
func (o *OrphansInspector) Name() string
type VolumeInfo ¶
Click to show internal directories.
Click to hide internal directories.