socket

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartCapture

func StartCapture(capture *Capture, url string, ch chan []byte)

Types

type Capture

type Capture struct {
	*CaptureInfo `json:"CaptureInfo,omitempty"`
	Stats        Stats `json:"Stats,omitempty"`
}

type CaptureInfo

type CaptureInfo struct {
	ContainerName      string `json:"container_name,omitempty"`
	ContainerNamespace string `json:"container_namespace,omitempty"`
	ContainerID        string `json:"containerID,omitempty"`
	Interface          string `json:"interface,omitempty"`
	FileName           string `json:"file_name,omitempty"`
}

type SocketCapture

type SocketCapture struct {
	Captures []*Capture `json:"captures,omitempty"`
	// contains filtered or unexported fields
}

func NewSocketCapture

func NewSocketCapture(level logrus.Level) *SocketCapture

func (*SocketCapture) AddCapture

func (s *SocketCapture) AddCapture(c *Capture)

func (*SocketCapture) MetricServer

func (s *SocketCapture) MetricServer()

func (*SocketCapture) StartCapture

func (s *SocketCapture) StartCapture(url string, ch chan []byte)

type Stats

type Stats struct {
	NbPacket uint `json:"NbPacket,omitempty"`
	NbBytes  uint `json:"NbBytes,omitempty"`
}

Jump to

Keyboard shortcuts

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