Documentation ¶
Index ¶
- Variables
- type GrpcClient
- func (c *GrpcClient) AddContainerNetworking(ctx context.Context, podName, nwNamespace string) (*contracts.ConfigureContainerNetworkingResponse, error)
- func (c *GrpcClient) DeleteContainerNetworking(ctx context.Context, podName, nwNamespace string) (*contracts.ConfigureContainerNetworkingResponse, error)
- type MockGrpcClient
- func (c *MockGrpcClient) AddContainerNetworking(ctx context.Context, podName, nwNamespace string) (*contracts.ConfigureContainerNetworkingResponse, error)
- func (c *MockGrpcClient) DeleteContainerNetworking(ctx context.Context, podName, nwNamespace string) (*contracts.ConfigureContainerNetworkingResponse, error)
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
Click to show internal directories.
Click to hide internal directories.