Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewAnalyzer (0.17 sec)

  1. istioctl/pkg/authz/analyzer.go

    )
    
    // Analyzer that can be used to check authorization policy.
    type Analyzer struct {
    	listenerDump *envoy_admin.ListenersConfigDump
    }
    
    // NewAnalyzer creates a new analyzer for a given pod based on its envoy config.
    func NewAnalyzer(envoyConfig *configdump.Wrapper) (*Analyzer, error) {
    	listeners, err := envoyConfig.GetDynamicListenerDump(true)
    	if err != nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Jul 13 01:59:17 GMT 2022
    - 2.1K bytes
    - Viewed (0)
  2. istioctl/pkg/authz/analyzer_test.go

    						},
    					},
    				},
    			},
    			wantErr: nil,
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if _, wanted2 := NewAnalyzer(tt.input); wanted2 != nil {
    				t.Errorf("Wanted %v, got %v", tt.wantErr, wanted2)
    			}
    		})
    	}
    }
    
    func TestPrint(t *testing.T) {
    	a := &Analyzer{
    		listenerDump: &envoy_admin.ListenersConfigDump{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  3. istioctl/pkg/authz/authz.go

    					return fmt.Errorf("failed to get config dump from pod %s in %s", podName, podNamespace)
    				}
    			} else {
    				return fmt.Errorf("expecting pod name or config dump, found: %d", len(args))
    			}
    
    			analyzer, err := NewAnalyzer(configDump)
    			if err != nil {
    				return err
    			}
    			analyzer.Print(cmd.OutOrStdout())
    			return nil
    		},
    		ValidArgsFunction: completion.ValidPodsNameArgs(ctx),
    	}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 5K bytes
    - Viewed (0)
Back to top