Documentation
¶
Index ¶
- func CreateMockAgg(name, recordKey, by, agg, op string, totalValue float64, totalCount int, ...) config.GenericMap
- func DeserializeJSONToMap(t *testing.T, in string) config.GenericMap
- func FakeLokiHandler(flowsData chan<- map[string]interface{}) http.HandlerFunc
- func GetExtractMockEntry() config.GenericMap
- func GetIngestMockEntry(missingKey bool) config.GenericMap
- func InitConfig(t *testing.T, conf string) *viper.Viper
- func RunCommand(command string) string
- func UDPPort() (int, error)
- type IPFIXClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMockAgg ¶
func DeserializeJSONToMap ¶
func DeserializeJSONToMap(t *testing.T, in string) config.GenericMap
func FakeLokiHandler ¶
func FakeLokiHandler(flowsData chan<- map[string]interface{}) http.HandlerFunc
FakeLokiHandler is a fake loki HTTP service that decodes the snappy/protobuf messages and forwards them for later assertions
func GetExtractMockEntry ¶
func GetExtractMockEntry() config.GenericMap
func GetIngestMockEntry ¶
func GetIngestMockEntry(missingKey bool) config.GenericMap
func RunCommand ¶
Types ¶
type IPFIXClient ¶
type IPFIXClient struct {
// contains filtered or unexported fields
}
IPFIXClient for IPFIX tests
func NewIPFIXClient ¶
func NewIPFIXClient(port int) (*IPFIXClient, error)
NewIPFIXClient returns an IPFIXClient that sends data to the given port
func (*IPFIXClient) SendFlow ¶
func (ke *IPFIXClient) SendFlow(timestamp uint32, srcIP string) error
SendFlow containing the information passed as an argument
func (*IPFIXClient) SendTemplate ¶
func (ke *IPFIXClient) SendTemplate() error
SendTemplate must be executed before sending any flow
Click to show internal directories.
Click to hide internal directories.