Documentation
¶
Index ¶
- Variables
- func Build(cfg *Config, cli ContainerClient) error
- type Builder
- type ClusterBuilder
- func (cb *ClusterBuilder) AddEdge(src, dst string, port node.Port)
- func (cb *ClusterBuilder) AddNode(n *node.Node) error
- func (cb *ClusterBuilder) CountRules() int
- func (cb *ClusterBuilder) FromReader(r io.Reader) (err error)
- func (cb *ClusterBuilder) Match(n *node.Node) (cluster string, ok bool)
- func (cb *ClusterBuilder) Name() string
- func (cb *ClusterBuilder) Write(w io.Writer)
- type Config
- type Connection
- type Container
- type ContainerClient
- type Enricher
- type Loader
- type MetaLoader
- type NamedBuilderWriter
- type NamedWriter
- type NetProto
- type ProcessInfo
- type VolumeInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidFormat = errors.New("invalid format") ErrInvalidRange = errors.New("invalid range") ErrPortCollision = errors.New("ports collision") )
View Source
var ErrNotEnough = errors.New("not enough items")
Functions ¶
func Build ¶
func Build( cfg *Config, cli ContainerClient, ) error
Types ¶
type ClusterBuilder ¶ added in v1.6.0
type ClusterBuilder struct {
// contains filtered or unexported fields
}
func NewClusterBuilder ¶ added in v1.6.0
func NewClusterBuilder( b NamedBuilderWriter, r exprRUN, ) *ClusterBuilder
func (*ClusterBuilder) AddEdge ¶ added in v1.6.0
func (cb *ClusterBuilder) AddEdge(src, dst string, port node.Port)
func (*ClusterBuilder) AddNode ¶ added in v1.6.0
func (cb *ClusterBuilder) AddNode(n *node.Node) error
func (*ClusterBuilder) CountRules ¶ added in v1.6.4
func (cb *ClusterBuilder) CountRules() int
func (*ClusterBuilder) FromReader ¶ added in v1.6.0
func (cb *ClusterBuilder) FromReader(r io.Reader) (err error)
func (*ClusterBuilder) Match ¶ added in v1.6.0
func (cb *ClusterBuilder) Match(n *node.Node) (cluster string, ok bool)
func (*ClusterBuilder) Name ¶ added in v1.6.0
func (cb *ClusterBuilder) Name() string
func (*ClusterBuilder) Write ¶ added in v1.6.0
func (cb *ClusterBuilder) Write(w io.Writer)
type Config ¶ added in v1.4.0
type Config struct {
Builder Builder
Meta Enricher
Follow string
SkipEnv []string
Proto NetProto
OnlyLocal bool
FullInfo bool
NoLoops bool
}
func (*Config) MatchProto ¶ added in v1.4.0
type Connection ¶
type Connection struct {
LocalIP net.IP
RemoteIP net.IP
LocalPort uint16
RemotePort uint16
Proto NetProto
}
func ParseNetstat ¶
func ParseNetstat(r io.Reader) (rv []*Connection, err error)
func (*Connection) IsInbound ¶
func (cn *Connection) IsInbound() bool
func (*Connection) IsListener ¶
func (cn *Connection) IsListener() bool
type Container ¶
type Container struct {
Endpoints map[string]string
ID string
Name string
Image string
Process *ProcessInfo
Volumes []*VolumeInfo
// contains filtered or unexported fields
}
func (*Container) ConnectionsCount ¶ added in v1.4.7
func (*Container) IterListeners ¶ added in v1.5.1
func (ct *Container) IterListeners(it func(*Connection))
func (*Container) IterOutbounds ¶ added in v1.5.1
func (ct *Container) IterOutbounds(it func(*Connection))
func (*Container) SetConnections ¶
func (ct *Container) SetConnections(conns []*Connection)
type ContainerClient ¶
type MetaLoader ¶ added in v1.4.0
type MetaLoader struct {
// contains filtered or unexported fields
}
func NewMetaLoader ¶ added in v1.4.0
func NewMetaLoader() *MetaLoader
func (*MetaLoader) Enrich ¶ added in v1.4.0
func (ex *MetaLoader) Enrich(n *node.Node)
func (*MetaLoader) FromReader ¶ added in v1.4.0
func (ex *MetaLoader) FromReader(r io.Reader) error
type NamedBuilderWriter ¶ added in v1.6.0
type NamedBuilderWriter interface {
Builder
NamedWriter
}
type NamedWriter ¶ added in v1.6.0
type ProcessInfo ¶ added in v1.5.0
type VolumeInfo ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.