mock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPodNotFound   = errors.New("pod not found")
	ErrMTPNCNotFound = errors.New("mtpnc not found")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	client.Client
	// contains filtered or unexported fields
}

Client implements the client.Client interface for testing. We only care about Get, the rest is nil ops.

func NewClient

func NewClient() *Client

NewClient returns a new MockClient.

func (*Client) Get

Get implements client.Client.Get.

type SWIFTv2Middleware

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

func NewMockSWIFTv2Middleware

func NewMockSWIFTv2Middleware() *SWIFTv2Middleware

func (*SWIFTv2Middleware) GetIPConfig

func (m *SWIFTv2Middleware) GetIPConfig(_ context.Context, podInfo cns.PodInfo) (cns.PodIpInfo, error)

GetSWIFTv2IPConfig(podInfo PodInfo) (*PodIpInfo, error) GetMultitenantIPConfig returns the IP config for a multitenant pod from the MTPNC CRD

func (*SWIFTv2Middleware) SetEnvVar

func (m *SWIFTv2Middleware) SetEnvVar()

func (*SWIFTv2Middleware) SetMTPNCReady

func (m *SWIFTv2Middleware) SetMTPNCReady()

func (*SWIFTv2Middleware) SetRoutes

func (m *SWIFTv2Middleware) SetRoutes(podIPInfo *cns.PodIpInfo) error

func (*SWIFTv2Middleware) UnsetEnvVar

func (m *SWIFTv2Middleware) UnsetEnvVar() error

func (*SWIFTv2Middleware) ValidateIPConfigsRequest

func (m *SWIFTv2Middleware) ValidateIPConfigsRequest(_ context.Context, req *cns.IPConfigsRequest) (respCode types.ResponseCode, message string)

validateMultitenantIPConfigsRequest validates if pod is multitenant nolint

Jump to

Keyboard shortcuts

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