v1

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package v1 contains the proto and compiled go files for the node network service v1 implementation.

A mock service under `mock` is used for unit testing the various services used for ncproxy.

Index

Constants

View Source
const (
	NodeNetworkService_ConfigureNetworking_FullMethodName          = "/nodenetsvc.v1.NodeNetworkService/ConfigureNetworking"
	NodeNetworkService_ConfigureContainerNetworking_FullMethodName = "/nodenetsvc.v1.NodeNetworkService/ConfigureContainerNetworking"
	NodeNetworkService_PingNodeNetworkService_FullMethodName       = "/nodenetsvc.v1.NodeNetworkService/PingNodeNetworkService"
	NodeNetworkService_GetHostLocalIpAddress_FullMethodName        = "/nodenetsvc.v1.NodeNetworkService/GetHostLocalIpAddress"
)

Variables

View Source
var (
	RequestType_name = map[int32]string{
		0: "Setup",
		1: "Teardown",
	}
	RequestType_value = map[string]int32{
		"Setup":    0,
		"Teardown": 1,
	}
)

Enum value maps for RequestType.

View Source
var File_github_com_Microsoft_hcsshim_pkg_ncproxy_nodenetsvc_v1_nodenetsvc_proto protoreflect.FileDescriptor
View Source
var NodeNetworkService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nodenetsvc.v1.NodeNetworkService",
	HandlerType: (*NodeNetworkServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ConfigureNetworking",
			Handler:    _NodeNetworkService_ConfigureNetworking_Handler,
		},
		{
			MethodName: "ConfigureContainerNetworking",
			Handler:    _NodeNetworkService_ConfigureContainerNetworking_Handler,
		},
		{
			MethodName: "PingNodeNetworkService",
			Handler:    _NodeNetworkService_PingNodeNetworkService_Handler,
		},
		{
			MethodName: "GetHostLocalIpAddress",
			Handler:    _NodeNetworkService_GetHostLocalIpAddress_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/Microsoft/hcsshim/pkg/ncproxy/nodenetsvc/v1/nodenetsvc.proto",
}

NodeNetworkService_ServiceDesc is the grpc.ServiceDesc for NodeNetworkService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterNodeNetworkServiceServer

func RegisterNodeNetworkServiceServer(s grpc.ServiceRegistrar, srv NodeNetworkServiceServer)

Types

type ConfigureContainerNetworkingRequest

type ConfigureContainerNetworkingRequest struct {
	RequestType        RequestType `` /* 126-byte string literal not displayed */
	ContainerID        string      `protobuf:"bytes,2,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
	NetworkNamespaceID string      `protobuf:"bytes,3,opt,name=network_namespace_id,json=networkNamespaceId,proto3" json:"network_namespace_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigureContainerNetworkingRequest) Descriptor deprecated

func (*ConfigureContainerNetworkingRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConfigureContainerNetworkingRequest.ProtoReflect.Descriptor instead.

func (*ConfigureContainerNetworkingRequest) GetContainerID

func (x *ConfigureContainerNetworkingRequest) GetContainerID() string

func (*ConfigureContainerNetworkingRequest) GetNetworkNamespaceID

func (x *ConfigureContainerNetworkingRequest) GetNetworkNamespaceID() string

func (*ConfigureContainerNetworkingRequest) GetRequestType

func (*ConfigureContainerNetworkingRequest) ProtoMessage

func (*ConfigureContainerNetworkingRequest) ProtoMessage()

func (*ConfigureContainerNetworkingRequest) ProtoReflect

func (*ConfigureContainerNetworkingRequest) Reset

func (*ConfigureContainerNetworkingRequest) String

type ConfigureContainerNetworkingResponse

type ConfigureContainerNetworkingResponse struct {
	Interfaces []*ContainerNetworkInterface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigureContainerNetworkingResponse) Descriptor deprecated

func (*ConfigureContainerNetworkingResponse) Descriptor() ([]byte, []int)

Deprecated: Use ConfigureContainerNetworkingResponse.ProtoReflect.Descriptor instead.

func (*ConfigureContainerNetworkingResponse) GetInterfaces

func (*ConfigureContainerNetworkingResponse) ProtoMessage

func (*ConfigureContainerNetworkingResponse) ProtoMessage()

func (*ConfigureContainerNetworkingResponse) ProtoReflect

func (*ConfigureContainerNetworkingResponse) Reset

func (*ConfigureContainerNetworkingResponse) String

type ConfigureNetworkingRequest

type ConfigureNetworkingRequest struct {
	ContainerID string      `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
	RequestType RequestType `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigureNetworkingRequest) Descriptor deprecated

func (*ConfigureNetworkingRequest) Descriptor() ([]byte, []int)

Deprecated: Use ConfigureNetworkingRequest.ProtoReflect.Descriptor instead.

func (*ConfigureNetworkingRequest) GetContainerID

func (x *ConfigureNetworkingRequest) GetContainerID() string

func (*ConfigureNetworkingRequest) GetRequestType

func (x *ConfigureNetworkingRequest) GetRequestType() RequestType

func (*ConfigureNetworkingRequest) ProtoMessage

func (*ConfigureNetworkingRequest) ProtoMessage()

func (*ConfigureNetworkingRequest) ProtoReflect

func (*ConfigureNetworkingRequest) Reset

func (x *ConfigureNetworkingRequest) Reset()

func (*ConfigureNetworkingRequest) String

func (x *ConfigureNetworkingRequest) String() string

type ConfigureNetworkingResponse

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

func (*ConfigureNetworkingResponse) Descriptor deprecated

func (*ConfigureNetworkingResponse) Descriptor() ([]byte, []int)

Deprecated: Use ConfigureNetworkingResponse.ProtoReflect.Descriptor instead.

func (*ConfigureNetworkingResponse) ProtoMessage

func (*ConfigureNetworkingResponse) ProtoMessage()

func (*ConfigureNetworkingResponse) ProtoReflect

func (*ConfigureNetworkingResponse) Reset

func (x *ConfigureNetworkingResponse) Reset()

func (*ConfigureNetworkingResponse) String

func (x *ConfigureNetworkingResponse) String() string

type ContainerIPAddress

type ContainerIPAddress struct {
	Version        string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Ip             string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	PrefixLength   string `protobuf:"bytes,4,opt,name=prefix_length,json=prefixLength,proto3" json:"prefix_length,omitempty"`
	DefaultGateway string `protobuf:"bytes,5,opt,name=default_gateway,json=defaultGateway,proto3" json:"default_gateway,omitempty"`
	// contains filtered or unexported fields
}

func (*ContainerIPAddress) Descriptor deprecated

func (*ContainerIPAddress) Descriptor() ([]byte, []int)

Deprecated: Use ContainerIPAddress.ProtoReflect.Descriptor instead.

func (*ContainerIPAddress) GetDefaultGateway

func (x *ContainerIPAddress) GetDefaultGateway() string

func (*ContainerIPAddress) GetIp

func (x *ContainerIPAddress) GetIp() string

func (*ContainerIPAddress) GetPrefixLength

func (x *ContainerIPAddress) GetPrefixLength() string

func (*ContainerIPAddress) GetVersion

func (x *ContainerIPAddress) GetVersion() string

func (*ContainerIPAddress) ProtoMessage

func (*ContainerIPAddress) ProtoMessage()

func (*ContainerIPAddress) ProtoReflect

func (x *ContainerIPAddress) ProtoReflect() protoreflect.Message

func (*ContainerIPAddress) Reset

func (x *ContainerIPAddress) Reset()

func (*ContainerIPAddress) String

func (x *ContainerIPAddress) String() string

type ContainerNetworkInterface

type ContainerNetworkInterface struct {
	Name               string                `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	MacAddress         string                `protobuf:"bytes,2,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"`
	NetworkNamespaceID string                `protobuf:"bytes,3,opt,name=network_namespace_id,json=networkNamespaceId,proto3" json:"network_namespace_id,omitempty"`
	Ipaddresses        []*ContainerIPAddress `protobuf:"bytes,4,rep,name=ipaddresses,proto3" json:"ipaddresses,omitempty"`
	// contains filtered or unexported fields
}

func (*ContainerNetworkInterface) Descriptor deprecated

func (*ContainerNetworkInterface) Descriptor() ([]byte, []int)

Deprecated: Use ContainerNetworkInterface.ProtoReflect.Descriptor instead.

func (*ContainerNetworkInterface) GetIpaddresses

func (x *ContainerNetworkInterface) GetIpaddresses() []*ContainerIPAddress

func (*ContainerNetworkInterface) GetMacAddress

func (x *ContainerNetworkInterface) GetMacAddress() string

func (*ContainerNetworkInterface) GetName

func (x *ContainerNetworkInterface) GetName() string

func (*ContainerNetworkInterface) GetNetworkNamespaceID

func (x *ContainerNetworkInterface) GetNetworkNamespaceID() string

func (*ContainerNetworkInterface) ProtoMessage

func (*ContainerNetworkInterface) ProtoMessage()

func (*ContainerNetworkInterface) ProtoReflect

func (*ContainerNetworkInterface) Reset

func (x *ContainerNetworkInterface) Reset()

func (*ContainerNetworkInterface) String

func (x *ContainerNetworkInterface) String() string

type GetHostLocalIpAddressRequest

type GetHostLocalIpAddressRequest struct {
	ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHostLocalIpAddressRequest) Descriptor deprecated

func (*GetHostLocalIpAddressRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetHostLocalIpAddressRequest.ProtoReflect.Descriptor instead.

func (*GetHostLocalIpAddressRequest) GetContainerID

func (x *GetHostLocalIpAddressRequest) GetContainerID() string

func (*GetHostLocalIpAddressRequest) ProtoMessage

func (*GetHostLocalIpAddressRequest) ProtoMessage()

func (*GetHostLocalIpAddressRequest) ProtoReflect

func (*GetHostLocalIpAddressRequest) Reset

func (x *GetHostLocalIpAddressRequest) Reset()

func (*GetHostLocalIpAddressRequest) String

type GetHostLocalIpAddressResponse

type GetHostLocalIpAddressResponse struct {
	IpAddr string `protobuf:"bytes,1,opt,name=ip_addr,json=ipAddr,proto3" json:"ip_addr,omitempty"`
	// contains filtered or unexported fields
}

func (*GetHostLocalIpAddressResponse) Descriptor deprecated

func (*GetHostLocalIpAddressResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetHostLocalIpAddressResponse.ProtoReflect.Descriptor instead.

func (*GetHostLocalIpAddressResponse) GetIpAddr

func (x *GetHostLocalIpAddressResponse) GetIpAddr() string

func (*GetHostLocalIpAddressResponse) ProtoMessage

func (*GetHostLocalIpAddressResponse) ProtoMessage()

func (*GetHostLocalIpAddressResponse) ProtoReflect

func (*GetHostLocalIpAddressResponse) Reset

func (x *GetHostLocalIpAddressResponse) Reset()

func (*GetHostLocalIpAddressResponse) String

type NodeNetworkServiceClient

type NodeNetworkServiceClient interface {
	ConfigureNetworking(ctx context.Context, in *ConfigureNetworkingRequest, opts ...grpc.CallOption) (*ConfigureNetworkingResponse, error)
	ConfigureContainerNetworking(ctx context.Context, in *ConfigureContainerNetworkingRequest, opts ...grpc.CallOption) (*ConfigureContainerNetworkingResponse, error)
	PingNodeNetworkService(ctx context.Context, in *PingNodeNetworkServiceRequest, opts ...grpc.CallOption) (*PingNodeNetworkServiceResponse, error)
	GetHostLocalIpAddress(ctx context.Context, in *GetHostLocalIpAddressRequest, opts ...grpc.CallOption) (*GetHostLocalIpAddressResponse, error)
}

NodeNetworkServiceClient is the client API for NodeNetworkService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type NodeNetworkServiceServer

type NodeNetworkServiceServer interface {
	ConfigureNetworking(context.Context, *ConfigureNetworkingRequest) (*ConfigureNetworkingResponse, error)
	ConfigureContainerNetworking(context.Context, *ConfigureContainerNetworkingRequest) (*ConfigureContainerNetworkingResponse, error)
	PingNodeNetworkService(context.Context, *PingNodeNetworkServiceRequest) (*PingNodeNetworkServiceResponse, error)
	GetHostLocalIpAddress(context.Context, *GetHostLocalIpAddressRequest) (*GetHostLocalIpAddressResponse, error)
	// contains filtered or unexported methods
}

NodeNetworkServiceServer is the server API for NodeNetworkService service. All implementations must embed UnimplementedNodeNetworkServiceServer for forward compatibility

type PingNodeNetworkServiceRequest

type PingNodeNetworkServiceRequest struct {
	PingRequestMessage string `protobuf:"bytes,1,opt,name=ping_request_message,json=pingRequestMessage,proto3" json:"ping_request_message,omitempty"`
	// contains filtered or unexported fields
}

func (*PingNodeNetworkServiceRequest) Descriptor deprecated

func (*PingNodeNetworkServiceRequest) Descriptor() ([]byte, []int)

Deprecated: Use PingNodeNetworkServiceRequest.ProtoReflect.Descriptor instead.

func (*PingNodeNetworkServiceRequest) GetPingRequestMessage

func (x *PingNodeNetworkServiceRequest) GetPingRequestMessage() string

func (*PingNodeNetworkServiceRequest) ProtoMessage

func (*PingNodeNetworkServiceRequest) ProtoMessage()

func (*PingNodeNetworkServiceRequest) ProtoReflect

func (*PingNodeNetworkServiceRequest) Reset

func (x *PingNodeNetworkServiceRequest) Reset()

func (*PingNodeNetworkServiceRequest) String

type PingNodeNetworkServiceResponse

type PingNodeNetworkServiceResponse struct {
	PingResponseMessage string `protobuf:"bytes,1,opt,name=ping_response_message,json=pingResponseMessage,proto3" json:"ping_response_message,omitempty"`
	// contains filtered or unexported fields
}

func (*PingNodeNetworkServiceResponse) Descriptor deprecated

func (*PingNodeNetworkServiceResponse) Descriptor() ([]byte, []int)

Deprecated: Use PingNodeNetworkServiceResponse.ProtoReflect.Descriptor instead.

func (*PingNodeNetworkServiceResponse) GetPingResponseMessage

func (x *PingNodeNetworkServiceResponse) GetPingResponseMessage() string

func (*PingNodeNetworkServiceResponse) ProtoMessage

func (*PingNodeNetworkServiceResponse) ProtoMessage()

func (*PingNodeNetworkServiceResponse) ProtoReflect

func (*PingNodeNetworkServiceResponse) Reset

func (x *PingNodeNetworkServiceResponse) Reset()

func (*PingNodeNetworkServiceResponse) String

type RequestType

type RequestType int32
const (
	RequestType_Setup    RequestType = 0
	RequestType_Teardown RequestType = 1
)

func (RequestType) Descriptor

func (RequestType) Enum

func (x RequestType) Enum() *RequestType

func (RequestType) EnumDescriptor deprecated

func (RequestType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RequestType.Descriptor instead.

func (RequestType) Number

func (x RequestType) Number() protoreflect.EnumNumber

func (RequestType) String

func (x RequestType) String() string

func (RequestType) Type

type UnimplementedNodeNetworkServiceServer

type UnimplementedNodeNetworkServiceServer struct {
}

UnimplementedNodeNetworkServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedNodeNetworkServiceServer) ConfigureNetworking

type UnsafeNodeNetworkServiceServer

type UnsafeNodeNetworkServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeNodeNetworkServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeNetworkServiceServer will result in compilation errors.

Directories

Path Synopsis
Package nodenetsvc_v1_mock is a generated GoMock package.
Package nodenetsvc_v1_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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