func (nsp *NetworkSecurityProbe) init() error {
	// Get boot time
	bt, err := host.BootTime()
	if err != nil {
		return err
	}
	nsp.bootTime = time.Unix(int64(bt), 0)
	// Get host netns
	nsp.hostNetns = utils.GetNetnsFromPid(1)
	// Initializes the k8s informer
	if err := nsp.KubeInformer.Init(nsp); err != nil {
		return err
	}
	// Initializes the cache
	nsp.Cache = NewCache(nsp.Config, utils.GetNetnsFromPid(1))
	return nil
}
// init - Initializes the NetworkSecurityProbe
Initializes the NetworkSecurityProbe
// init - Initializes the NetworkSecurityProbe
func (nsp *NetworkSecurityProbe) init() error {
	bt, err := host.BootTime()
	if err != nil {
		return err
	}
	nsp.bootTime = time.Unix(int64(bt), 0)
	nsp.hostNetns = utils.GetNetnsFromPid(1)
	if err := nsp.KubeInformer.Init(nsp); err != nil {
		return err
	}
	nsp.Cache = NewCache(nsp.Config, utils.GetNetnsFromPid(1))
	return nil
}
func ( nsp * NetworkSecurityProbe ) init ( ) error { bt , err := host . BootTime ( ) if err != nil { return err } nsp . bootTime = time . Unix ( int64 ( bt ) , 0 ) nsp . hostNetns = utils . GetNetnsFromPid ( 1 ) if err := nsp . KubeInformer . Init ( nsp ) ; err != nil { return err } nsp . Cache = NewCache ( nsp . Config , utils . GetNetnsFromPid ( 1 ) ) return nil }
Initializes the NetworkSecurityProbe
Initializes the NetworkSecurityProbe
// Get boot time // Get host netns // Initializes the k8s informer // Initializes the cache