v1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPAMService_Allocate_FullMethodName    = "/nvidia.ipam.node.v1.IPAMService/Allocate"
	IPAMService_IsAllocated_FullMethodName = "/nvidia.ipam.node.v1.IPAMService/IsAllocated"
	IPAMService_Deallocate_FullMethodName  = "/nvidia.ipam.node.v1.IPAMService/Deallocate"
)

Variables

View Source
var File_nvidia_ipam_node_v1_node_proto protoreflect.FileDescriptor
View Source
var IPAMService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nvidia.ipam.node.v1.IPAMService",
	HandlerType: (*IPAMServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Allocate",
			Handler:    _IPAMService_Allocate_Handler,
		},
		{
			MethodName: "IsAllocated",
			Handler:    _IPAMService_IsAllocated_Handler,
		},
		{
			MethodName: "Deallocate",
			Handler:    _IPAMService_Deallocate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "nvidia/ipam/node/v1/node.proto",
}

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

Functions

func RegisterIPAMServiceServer

func RegisterIPAMServiceServer(s grpc.ServiceRegistrar, srv IPAMServiceServer)

Types

type AllocateRequest

type AllocateRequest struct {

	// required, IPAMParameters contains parameters IPAM parameters related to the request
	Parameters *IPAMParameters `protobuf:"bytes,1,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

AllocateRequest contains parameters for Allocate rpc call

func (*AllocateRequest) Descriptor deprecated

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

Deprecated: Use AllocateRequest.ProtoReflect.Descriptor instead.

func (*AllocateRequest) GetParameters

func (x *AllocateRequest) GetParameters() *IPAMParameters

func (*AllocateRequest) ProtoMessage

func (*AllocateRequest) ProtoMessage()

func (*AllocateRequest) ProtoReflect

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

func (*AllocateRequest) Reset

func (x *AllocateRequest) Reset()

func (*AllocateRequest) String

func (x *AllocateRequest) String() string

type AllocateResponse

type AllocateResponse struct {

	// list of allocated IPs
	Allocations []*AllocationInfo `protobuf:"bytes,1,rep,name=allocations,proto3" json:"allocations,omitempty"`
	// contains filtered or unexported fields
}

AllocateResponse contains reply for Allocate rpc call

func (*AllocateResponse) Descriptor deprecated

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

Deprecated: Use AllocateResponse.ProtoReflect.Descriptor instead.

func (*AllocateResponse) GetAllocations

func (x *AllocateResponse) GetAllocations() []*AllocationInfo

func (*AllocateResponse) ProtoMessage

func (*AllocateResponse) ProtoMessage()

func (*AllocateResponse) ProtoReflect

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

func (*AllocateResponse) Reset

func (x *AllocateResponse) Reset()

func (*AllocateResponse) String

func (x *AllocateResponse) String() string

type AllocationInfo

type AllocationInfo struct {

	// name of the pool in which this IP was allocated
	Pool string `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"`
	// allocated IP together with prefix length, e.g. 192.168.10.33/24
	Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	// gateway for allocated IP
	Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"`
	// contains filtered or unexported fields
}

AllocationInfo contains information about the allocation

func (*AllocationInfo) Descriptor deprecated

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

Deprecated: Use AllocationInfo.ProtoReflect.Descriptor instead.

func (*AllocationInfo) GetGateway

func (x *AllocationInfo) GetGateway() string

func (*AllocationInfo) GetIp

func (x *AllocationInfo) GetIp() string

func (*AllocationInfo) GetPool

func (x *AllocationInfo) GetPool() string

func (*AllocationInfo) ProtoMessage

func (*AllocationInfo) ProtoMessage()

func (*AllocationInfo) ProtoReflect

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

func (*AllocationInfo) Reset

func (x *AllocationInfo) Reset()

func (*AllocationInfo) String

func (x *AllocationInfo) String() string

type DeallocateRequest

type DeallocateRequest struct {

	// required, IPAMParameters contains parameters IPAM parameters related to the request
	Parameters *IPAMParameters `protobuf:"bytes,1,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

DeallocateRequest contains parameters for Deallocate rpc call

func (*DeallocateRequest) Descriptor deprecated

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

Deprecated: Use DeallocateRequest.ProtoReflect.Descriptor instead.

func (*DeallocateRequest) GetParameters

func (x *DeallocateRequest) GetParameters() *IPAMParameters

func (*DeallocateRequest) ProtoMessage

func (*DeallocateRequest) ProtoMessage()

func (*DeallocateRequest) ProtoReflect

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

func (*DeallocateRequest) Reset

func (x *DeallocateRequest) Reset()

func (*DeallocateRequest) String

func (x *DeallocateRequest) String() string

type DeallocateResponse

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

DeallocateReply contains reply for Deallocate rpc call

func (*DeallocateResponse) Descriptor deprecated

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

Deprecated: Use DeallocateResponse.ProtoReflect.Descriptor instead.

func (*DeallocateResponse) ProtoMessage

func (*DeallocateResponse) ProtoMessage()

func (*DeallocateResponse) ProtoReflect

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

func (*DeallocateResponse) Reset

func (x *DeallocateResponse) Reset()

func (*DeallocateResponse) String

func (x *DeallocateResponse) String() string

type IPAMMetadata

type IPAMMetadata struct {

	// required, name of the k8s pod
	K8SPodName string `protobuf:"bytes,1,opt,name=k8s_pod_name,json=k8sPodName,proto3" json:"k8s_pod_name,omitempty"`
	// required, namespace of the k8s pod
	K8SPodNamespace string `protobuf:"bytes,2,opt,name=k8s_pod_namespace,json=k8sPodNamespace,proto3" json:"k8s_pod_namespace,omitempty"`
	// optional, UID of the k8s pod, k8s_pod_uid exist in containerd >= 1.6 cr-io >= 0.3
	K8SPodUid string `protobuf:"bytes,3,opt,name=k8s_pod_uid,json=k8sPodUid,proto3" json:"k8s_pod_uid,omitempty"`
	// optional, PCI device ID related to the allocation
	DeviceId string `protobuf:"bytes,4,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	// contains filtered or unexported fields
}

IPAMMetadata contains metadata for IPAM calls

func (*IPAMMetadata) Descriptor deprecated

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

Deprecated: Use IPAMMetadata.ProtoReflect.Descriptor instead.

func (*IPAMMetadata) GetDeviceId

func (x *IPAMMetadata) GetDeviceId() string

func (*IPAMMetadata) GetK8SPodName

func (x *IPAMMetadata) GetK8SPodName() string

func (*IPAMMetadata) GetK8SPodNamespace

func (x *IPAMMetadata) GetK8SPodNamespace() string

func (*IPAMMetadata) GetK8SPodUid

func (x *IPAMMetadata) GetK8SPodUid() string

func (*IPAMMetadata) ProtoMessage

func (*IPAMMetadata) ProtoMessage()

func (*IPAMMetadata) ProtoReflect

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

func (*IPAMMetadata) Reset

func (x *IPAMMetadata) Reset()

func (*IPAMMetadata) String

func (x *IPAMMetadata) String() string

type IPAMParameters

type IPAMParameters struct {

	// required, list of pools in which IP addresses should be allocated,
	// must contain one or two elements (dual-stack, IPv4 + IPv6 use-case)
	Pools []string `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"`
	// required, a unique plaintext identifier for a container, allocated by the runtime
	CniContainerid string `protobuf:"bytes,2,opt,name=cni_containerid,json=cniContainerid,proto3" json:"cni_containerid,omitempty"`
	// required, name of the interface inside the container
	CniIfname string `protobuf:"bytes,3,opt,name=cni_ifname,json=cniIfname,proto3" json:"cni_ifname,omitempty"`
	// required, additional metadata to identify IP allocation
	Metadata *IPAMMetadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

IPAMParameters common message which contains information used in all rpc calls

func (*IPAMParameters) Descriptor deprecated

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

Deprecated: Use IPAMParameters.ProtoReflect.Descriptor instead.

func (*IPAMParameters) GetCniContainerid

func (x *IPAMParameters) GetCniContainerid() string

func (*IPAMParameters) GetCniIfname

func (x *IPAMParameters) GetCniIfname() string

func (*IPAMParameters) GetMetadata

func (x *IPAMParameters) GetMetadata() *IPAMMetadata

func (*IPAMParameters) GetPools

func (x *IPAMParameters) GetPools() []string

func (*IPAMParameters) ProtoMessage

func (*IPAMParameters) ProtoMessage()

func (*IPAMParameters) ProtoReflect

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

func (*IPAMParameters) Reset

func (x *IPAMParameters) Reset()

func (*IPAMParameters) String

func (x *IPAMParameters) String() string

type IPAMServiceClient

type IPAMServiceClient interface {
	// Allocate is called as a part of CMD_ADD flow.
	// Returns response with allocated IPs if allocation succeeds or an error in case of failure.
	// If multiple pools are provided in the request, then allocation succeeds if it succeeds for all pools.
	// errors:
	//
	//	Canceled - request was canceled by the caller
	//	Internal - internal failure of the service, this error can't be fixed by the caller
	//	InvalidArgument - missing required argument or argument has wrong format, check message for details
	//	NotFound - allocation is requested for unknown IP pool
	//	AlreadyExists - container identified by IPAMParameters already has allocated IP in the pool
	//	ResourceExhausted - no free IP addresses available in the IP pool
	Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error)
	// IsAllocated is called as a part of CMD_CHECK flow
	// Returns empty response if a valid allocation already exists or an error otherwise.
	// If multiple pools are provided in the request, then check
	// succeed only if it is succeed for all pools.
	// errors:
	//
	//	Canceled - request was canceled by the caller
	//	Internal - internal failure of the service, this error can't be fixed by the caller
	//	InvalidArgument - missing required argument or argument has wrong format, check message for details
	//	NotFound - allocation not found
	IsAllocated(ctx context.Context, in *IsAllocatedRequest, opts ...grpc.CallOption) (*IsAllocatedResponse, error)
	// Deallocate is called as a part of CMD_DEL flow.
	// Returns empty response if allocation for all pools released successfully or error otherwise.
	// If multiple pools are provided in the request, then deallocation
	// succeeds if it is succeeds for all pools else no deallocation is performed.
	// errors:
	//
	//	Canceled - request was canceled by the caller
	//	Internal - internal failure of the service, this error can't be fixed by the caller
	//	InvalidArgument - missing required argument or argument has wrong format, check message for details
	Deallocate(ctx context.Context, in *DeallocateRequest, opts ...grpc.CallOption) (*DeallocateResponse, error)
}

IPAMServiceClient is the client API for IPAMService 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 IPAMServiceServer

type IPAMServiceServer interface {
	// Allocate is called as a part of CMD_ADD flow.
	// Returns response with allocated IPs if allocation succeeds or an error in case of failure.
	// If multiple pools are provided in the request, then allocation succeeds if it succeeds for all pools.
	// errors:
	//
	//	Canceled - request was canceled by the caller
	//	Internal - internal failure of the service, this error can't be fixed by the caller
	//	InvalidArgument - missing required argument or argument has wrong format, check message for details
	//	NotFound - allocation is requested for unknown IP pool
	//	AlreadyExists - container identified by IPAMParameters already has allocated IP in the pool
	//	ResourceExhausted - no free IP addresses available in the IP pool
	Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error)
	// IsAllocated is called as a part of CMD_CHECK flow
	// Returns empty response if a valid allocation already exists or an error otherwise.
	// If multiple pools are provided in the request, then check
	// succeed only if it is succeed for all pools.
	// errors:
	//
	//	Canceled - request was canceled by the caller
	//	Internal - internal failure of the service, this error can't be fixed by the caller
	//	InvalidArgument - missing required argument or argument has wrong format, check message for details
	//	NotFound - allocation not found
	IsAllocated(context.Context, *IsAllocatedRequest) (*IsAllocatedResponse, error)
	// Deallocate is called as a part of CMD_DEL flow.
	// Returns empty response if allocation for all pools released successfully or error otherwise.
	// If multiple pools are provided in the request, then deallocation
	// succeeds if it is succeeds for all pools else no deallocation is performed.
	// errors:
	//
	//	Canceled - request was canceled by the caller
	//	Internal - internal failure of the service, this error can't be fixed by the caller
	//	InvalidArgument - missing required argument or argument has wrong format, check message for details
	Deallocate(context.Context, *DeallocateRequest) (*DeallocateResponse, error)
	// contains filtered or unexported methods
}

IPAMServiceServer is the server API for IPAMService service. All implementations must embed UnimplementedIPAMServiceServer for forward compatibility

type IsAllocatedRequest

type IsAllocatedRequest struct {

	// required, IPAMParameters contains parameters IPAM parameters related to the request
	Parameters *IPAMParameters `protobuf:"bytes,1,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

IsAllocatedRequest contains parameters for IsAllocated rpc call

func (*IsAllocatedRequest) Descriptor deprecated

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

Deprecated: Use IsAllocatedRequest.ProtoReflect.Descriptor instead.

func (*IsAllocatedRequest) GetParameters

func (x *IsAllocatedRequest) GetParameters() *IPAMParameters

func (*IsAllocatedRequest) ProtoMessage

func (*IsAllocatedRequest) ProtoMessage()

func (*IsAllocatedRequest) ProtoReflect

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

func (*IsAllocatedRequest) Reset

func (x *IsAllocatedRequest) Reset()

func (*IsAllocatedRequest) String

func (x *IsAllocatedRequest) String() string

type IsAllocatedResponse

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

IsAllocatedReply contains reply for IsAllocated rpc call

func (*IsAllocatedResponse) Descriptor deprecated

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

Deprecated: Use IsAllocatedResponse.ProtoReflect.Descriptor instead.

func (*IsAllocatedResponse) ProtoMessage

func (*IsAllocatedResponse) ProtoMessage()

func (*IsAllocatedResponse) ProtoReflect

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

func (*IsAllocatedResponse) Reset

func (x *IsAllocatedResponse) Reset()

func (*IsAllocatedResponse) String

func (x *IsAllocatedResponse) String() string

type UnimplementedIPAMServiceServer

type UnimplementedIPAMServiceServer struct {
}

UnimplementedIPAMServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedIPAMServiceServer) Allocate

func (UnimplementedIPAMServiceServer) Deallocate

func (UnimplementedIPAMServiceServer) IsAllocated

type UnsafeIPAMServiceServer

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

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

Jump to

Keyboard shortcuts

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