Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for newInternal (0.11 sec)

  1. pkg/proxy/util/nfacct/nfacct_linux.go

    }
    
    // New returns a new Interface.
    func New() (Interface, error) {
    	hndlr, err := newNetlinkHandler()
    	if err != nil {
    		return nil, err
    	}
    	return newInternal(hndlr)
    }
    
    // newInternal returns a new Interface with the given handler.
    func newInternal(hndlr handler) (Interface, error) {
    	return &runner{handler: hndlr}, nil
    
    }
    
    // Ensure is part of the interface.
    func (r *runner) Ensure(name string) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 06:47:50 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  2. pkg/proxy/util/nfacct/nfacct_linux_test.go

    			// expected calls: zero (the error should be returned by this library)
    			netlinkCalls: 0,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			rnr, err := newInternal(tc.handler)
    			assert.NoError(t, err)
    
    			err = rnr.Add(tc.counterName)
    			if tc.err != nil {
    				assert.ErrorContains(t, err, tc.err.Error())
    			} else {
    				assert.NoError(t, err)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 06:47:50 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  3. pkg/util/iptables/iptables_test.go

    			func(cmd string, args ...string) exec.Cmd { return fakeexec.InitFakeCmd(&fcmd, cmd, args...) },
    		},
    	}
    	lockPath14x, lockPath16x := getLockPaths()
    	runner := newInternal(fexec, ProtocolIPv4, lockPath14x, lockPath16x)
    
    	err := runner.RestoreAll([]byte{}, NoFlushTables, RestoreCounters)
    	if err != nil {
    		t.Fatalf("expected success, got %v", err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 08 15:21:59 UTC 2023
    - 46.3K bytes
    - Viewed (0)
  4. pkg/util/iptables/iptables.go

    	hasRandomFully  bool
    	waitFlag        []string
    	restoreWaitFlag []string
    	lockfilePath14x string
    	lockfilePath16x string
    }
    
    // newInternal returns a new Interface which will exec iptables, and allows the
    // caller to change the iptables-restore lockfile path
    func newInternal(exec utilexec.Interface, protocol Protocol, lockfilePath14x, lockfilePath16x string) Interface {
    	version, err := getIPTablesVersion(exec, protocol)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 28.6K bytes
    - Viewed (0)
Back to top