fake

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fake implements fake IPAM grpc interfaces for testing purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAMClient

type IPAMClient struct {
	// contains filtered or unexported fields
}

IPAMClient provides a mock implementation of the IPAMClient interface for testing purposes.

func NewIPAMClient

func NewIPAMClient(localRemappedPodCIDR, remoteRemappedPodCIDR string, enforceSingleRequest bool) *IPAMClient

NewIPAMClient returns a new fake IPAMClient.

func (*IPAMClient) BelongsToPodCIDR added in v0.3.2

BelongsToPodCIDR mocks the corresponding IPAMClient function.

func (*IPAMClient) GetHomePodIP

GetHomePodIP mocks the corresponding IPAMClient function.

func (*IPAMClient) IsEndpointTranslated

func (mock *IPAMClient) IsEndpointTranslated(ip string) bool

IsEndpointTranslated returns whether the given endpoint has a valid translation.

func (*IPAMClient) MapEndpointIP

func (mock *IPAMClient) MapEndpointIP(_ context.Context, req *ipam.MapRequest, _ ...grpc.CallOption) (*ipam.MapResponse, error)

MapEndpointIP mocks the corresponding IPAMClient function.

func (*IPAMClient) UnmapEndpointIP

func (mock *IPAMClient) UnmapEndpointIP(_ context.Context, req *ipam.UnmapRequest, _ ...grpc.CallOption) (*ipam.UnmapResponse, error)

UnmapEndpointIP mocks the corresponding IPAMClient function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL