kubernetesk8s.io/kubernetes/pkg/proxy/util/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/proxy/util/testing"

Index

Types

type FakeNetwork

type FakeNetwork struct {
	NetworkInterfaces []net.Interface
	// The key of map Addrs is the network interface name
	Address map[string][]net.Addr
}

FakeNetwork implements the NetworkInterfacer interface for test purpose.

func NewFakeNetwork

func NewFakeNetwork() *FakeNetwork

NewFakeNetwork initializes a FakeNetwork.

func (*FakeNetwork) AddInterfaceAddr

func (f *FakeNetwork) AddInterfaceAddr(intf *net.Interface, addrs []net.Addr)

AddInterfaceAddr create an interface and its associated addresses for FakeNetwork implementation.

func (*FakeNetwork) InterfaceAddrs

func (f *FakeNetwork) InterfaceAddrs() ([]net.Addr, error)

InterfaceAddrs is part of NetworkInterfacer interface.

Source Files

fake.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
1 packages
Last checked
3 hours ago

Tools for package owners.