Documentation ¶
Index ¶
- func CointainerdPidFromID(id string) (pid uint32, retErr error)
- func DockerPIDFromID(id string) (pid uint32, retErr error)
- func ObserveLocal(q chan<- [][]byte, rateLimiters []*ratelimiter.SlidingWindow, cfg *conf.Main, ...)
- func ObserveViaK8sAPI(q chan<- [][]byte, rateLimiters []*ratelimiter.SlidingWindow, cfg *conf.Main, ...)
- func OpenTCPTunnelByPID(pid uint32, port uint16) (listener *net.TCPListener, returnErr error)
- type Cont
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CointainerdPidFromID ¶
CointainerdPidFromID returns PID for container
func DockerPIDFromID ¶
DockerPIDFromID gets Docker container host PID using Docker API.
func ObserveLocal ¶
func ObserveLocal(q chan<- [][]byte, rateLimiters []*ratelimiter.SlidingWindow, cfg *conf.Main, stop <-chan struct{}, wg *sync.WaitGroup, lg *zap.Logger, ms *metrics.Prom)
ObserveLocal is a function to observe and check for labeled pods via the local Docker service. Non-blocking. Dones wg on finish.
func ObserveViaK8sAPI ¶
func ObserveViaK8sAPI(q chan<- [][]byte, rateLimiters []*ratelimiter.SlidingWindow, cfg *conf.Main, stop <-chan struct{}, wg *sync.WaitGroup, lg *zap.Logger, ms *metrics.Prom)
ObserveViaK8sAPI is a function to observe and check for labeled pods via k8s API server. Non-blocking. Dones wg on finish.
func OpenTCPTunnelByPID ¶
func OpenTCPTunnelByPID(pid uint32, port uint16) (listener *net.TCPListener, returnErr error)
OpenTCPTunnelByPID opens an injected TCP port for listening in a container identified by PID.
Types ¶
type Cont ¶
type Cont struct { ID string Name string IsContainerd bool Q chan<- [][]byte Cfg *conf.Main Port uint16 GlobalStop <-chan struct{} // used to stop operation globally (propagated from above) OwnStop chan struct{} // used to stop operation independently Wg *sync.WaitGroup RateLimiters []*ratelimiter.SlidingWindow Lg *zap.Logger Ms *metrics.Prom }
Cont represents a container.
func NewCont ¶
func NewCont(id string, name string, isContainerd bool, q chan<- [][]byte, rateLimiters []*ratelimiter.SlidingWindow, stop <-chan struct{}, wg *sync.WaitGroup, cfg *conf.Main, lg *zap.Logger, ms *metrics.Prom) *Cont
NewCont is a constructor.
func (*Cont) StartForwarding ¶
func (c *Cont) StartForwarding()
StartForwarding starts forwarding Graphite line data from container.
Click to show internal directories.
Click to hide internal directories.