nns

package
v1.4.55 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMockNnsAdd = errors.New("mock nns add fail")

ErrMockNnsAdd - mock add failure

Functions

This section is empty.

Types

type GrpcClient

type GrpcClient struct{}

client to invoke Node network service APIs using grpc

func (*GrpcClient) AddContainerNetworking

func (c *GrpcClient) AddContainerNetworking(
	ctx context.Context,
	podName, nwNamespace string) (*contracts.ConfigureContainerNetworkingResponse, error)

Add container to the network. Container Id is appended to the podName

func (*GrpcClient) DeleteContainerNetworking

func (c *GrpcClient) DeleteContainerNetworking(
	ctx context.Context,
	podName, nwNamespace string) (*contracts.ConfigureContainerNetworkingResponse, error)

Add container to the network. Container Id is appended to the podName

type MockGrpcClient

type MockGrpcClient struct {
	Fail bool
}

Mock client to simulate Node network service APIs

func (*MockGrpcClient) AddContainerNetworking

func (c *MockGrpcClient) AddContainerNetworking(
	ctx context.Context,
	podName, nwNamespace string) (*contracts.ConfigureContainerNetworkingResponse, error)

AddContainerNetworking - Mock nns add

func (*MockGrpcClient) DeleteContainerNetworking

func (c *MockGrpcClient) DeleteContainerNetworking(
	ctx context.Context,
	podName, nwNamespace string) (*contracts.ConfigureContainerNetworkingResponse, error)

DeleteContainerNetworking - Mock nns delete

Jump to

Keyboard shortcuts

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