kubernetes: k8s.io/kubernetes/pkg/proxy/util/testing Index | Files

package testing

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


Package Files


type AddrStruct Uses

type AddrStruct struct{ Val string }

AddrStruct implements the net.Addr for test purpose.

func (AddrStruct) Network Uses

func (a AddrStruct) Network() string

Network is part of net.Addr interface.

func (AddrStruct) String Uses

func (a AddrStruct) String() string

String is part of net.Addr interface.

type FakeNetwork Uses

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 Uses

func NewFakeNetwork() *FakeNetwork

NewFakeNetwork initializes a FakeNetwork.

func (*FakeNetwork) AddInterfaceAddr Uses

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

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

func (*FakeNetwork) Addrs Uses

func (f *FakeNetwork) Addrs(intf *net.Interface) ([]net.Addr, error)

Addrs is part of NetworkInterfacer interface.

func (*FakeNetwork) Interfaces Uses

func (f *FakeNetwork) Interfaces() ([]net.Interface, error)

Interfaces is part of NetworkInterfacer interface.

Package testing imports 1 packages (graph). Updated 2018-03-02. Refresh now. Tools for package owners.