Documentation ¶
Index ¶
- Constants
- func CreateAllCerts(t *testing.T) (string, string, string, func())
- func CreateCACert(t *testing.T) (string, func())
- func CreateMockAgg(name, operationKey, groupByKeys, agg, op string, totalValue float64, ...) config.GenericMap
- func DeserializeJSONToMap(t *testing.T, in string) config.GenericMap
- func DumpToTemp(content string) (string, error, func())
- func FakeLokiHandler(flowsData chan<- map[string]interface{}) http.HandlerFunc
- func GetExtractMockEntries2() []config.GenericMap
- func GetExtractMockEntries3() []config.GenericMap
- func GetExtractMockEntry() config.GenericMap
- func GetIngestMockEntry(missingKey bool) config.GenericMap
- func InitConfig(t *testing.T, conf string) (*viper.Viper, *config.ConfigFileStruct)
- func ReadExposedMetrics(t *testing.T) string
- func ResetPromRegistry()
- func RunCommand(command string) string
- func UDPPort() (int, error)
- func WaitFromChannel(in chan config.GenericMap, timeout time.Duration) (config.GenericMap, error)
- type IPFIXClient
Constants ¶
View Source
const ConfgenLongConfig = `` /* 572-byte string literal not displayed */
View Source
const ConfgenNetworkDefBase = `` /* 820-byte string literal not displayed */
View Source
const ConfgenNetworkDefHisto = `` /* 555-byte string literal not displayed */
View Source
const ConfgenNetworkDefNoAgg = `` /* 587-byte string literal not displayed */
View Source
const ConfgenShortConfig = `` /* 397-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CreateAllCerts ¶ added in v0.1.3
CreateAllCerts returns paths to: - ca - user cert - user key and the cleanup function to defer
func CreateCACert ¶ added in v0.1.3
CreateCACert returns paths to CA cert and the cleanup function to defer
func CreateMockAgg ¶
func DeserializeJSONToMap ¶
func DeserializeJSONToMap(t *testing.T, in string) config.GenericMap
func DumpToTemp ¶ added in v0.1.3
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 GetExtractMockEntries2 ¶ added in v0.1.4
func GetExtractMockEntries2() []config.GenericMap
func GetExtractMockEntries3 ¶ added in v0.1.10
func GetExtractMockEntries3() []config.GenericMap
func GetExtractMockEntry ¶
func GetExtractMockEntry() config.GenericMap
func GetIngestMockEntry ¶
func GetIngestMockEntry(missingKey bool) config.GenericMap
func InitConfig ¶
func ReadExposedMetrics ¶ added in v0.1.4
func ResetPromRegistry ¶ added in v0.1.4
func ResetPromRegistry()
ResetPromRegistry resets the prometheus registry. Invoke this function on tests that may register metrics that were already registered by other tests.
func RunCommand ¶
func WaitFromChannel ¶ added in v0.1.3
func WaitFromChannel(in chan config.GenericMap, timeout time.Duration) (config.GenericMap, error)
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.