rpc

package
v2.2.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DHCP_RentIP_FullMethodName    = "/rpc.DHCP/RentIP"
	DHCP_ReleaseIP_FullMethodName = "/rpc.DHCP/ReleaseIP"
)

Variables

View Source
var DHCP_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpc.DHCP",
	HandlerType: (*DHCPServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RentIP",
			Handler:    _DHCP_RentIP_Handler,
		},
		{
			MethodName: "ReleaseIP",
			Handler:    _DHCP_ReleaseIP_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "dhcpserver.proto",
}

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

View Source
var File_dhcpserver_proto protoreflect.FileDescriptor

Functions

func RegisterDHCPServer

func RegisterDHCPServer(s grpc.ServiceRegistrar, srv DHCPServer)

Types

type DHCPClient

type DHCPClient interface {
	RentIP(ctx context.Context, in *RentIPRequest, opts ...grpc.CallOption) (*RentIPResponse, error)
	ReleaseIP(ctx context.Context, in *ReleaseIPRequest, opts ...grpc.CallOption) (*ReleaseIPResponse, error)
}

DHCPClient is the client API for DHCP 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.

func NewDHCPClient

func NewDHCPClient(cc grpc.ClientConnInterface) DHCPClient

type DHCPServer

type DHCPServer interface {
	RentIP(context.Context, *RentIPRequest) (*RentIPResponse, error)
	ReleaseIP(context.Context, *ReleaseIPRequest) (*ReleaseIPResponse, error)
	// contains filtered or unexported methods
}

DHCPServer is the server API for DHCP service. All implementations must embed UnimplementedDHCPServer for forward compatibility

type ReleaseIPRequest

type ReleaseIPRequest struct {
	PodName      string `protobuf:"bytes,1,opt,name=PodName,proto3" json:"PodName,omitempty"`
	PodNamespace string `protobuf:"bytes,2,opt,name=PodNamespace,proto3" json:"PodNamespace,omitempty"`
	IPv4CIDR     string `protobuf:"bytes,3,opt,name=IPv4CIDR,proto3" json:"IPv4CIDR,omitempty"`
	IPv6CIDR     string `protobuf:"bytes,4,opt,name=IPv6CIDR,proto3" json:"IPv6CIDR,omitempty"`
	// contains filtered or unexported fields
}

func (*ReleaseIPRequest) Descriptor deprecated

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

Deprecated: Use ReleaseIPRequest.ProtoReflect.Descriptor instead.

func (*ReleaseIPRequest) GetIPv4CIDR

func (x *ReleaseIPRequest) GetIPv4CIDR() string

func (*ReleaseIPRequest) GetIPv6CIDR

func (x *ReleaseIPRequest) GetIPv6CIDR() string

func (*ReleaseIPRequest) GetPodName

func (x *ReleaseIPRequest) GetPodName() string

func (*ReleaseIPRequest) GetPodNamespace

func (x *ReleaseIPRequest) GetPodNamespace() string

func (*ReleaseIPRequest) ProtoMessage

func (*ReleaseIPRequest) ProtoMessage()

func (*ReleaseIPRequest) ProtoReflect

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

func (*ReleaseIPRequest) Reset

func (x *ReleaseIPRequest) Reset()

func (*ReleaseIPRequest) String

func (x *ReleaseIPRequest) String() string

type ReleaseIPResponse

type ReleaseIPResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ReleaseIPResponse) Descriptor deprecated

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

Deprecated: Use ReleaseIPResponse.ProtoReflect.Descriptor instead.

func (*ReleaseIPResponse) GetMessage

func (x *ReleaseIPResponse) GetMessage() string

func (*ReleaseIPResponse) ProtoMessage

func (*ReleaseIPResponse) ProtoMessage()

func (*ReleaseIPResponse) ProtoReflect

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

func (*ReleaseIPResponse) Reset

func (x *ReleaseIPResponse) Reset()

func (*ReleaseIPResponse) String

func (x *ReleaseIPResponse) String() string

type RentIPRequest

type RentIPRequest struct {
	PodName      string `protobuf:"bytes,1,opt,name=PodName,proto3" json:"PodName,omitempty"`
	PodNamespace string `protobuf:"bytes,2,opt,name=PodNamespace,proto3" json:"PodNamespace,omitempty"`
	// contains filtered or unexported fields
}

func (*RentIPRequest) Descriptor deprecated

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

Deprecated: Use RentIPRequest.ProtoReflect.Descriptor instead.

func (*RentIPRequest) GetPodName

func (x *RentIPRequest) GetPodName() string

func (*RentIPRequest) GetPodNamespace

func (x *RentIPRequest) GetPodNamespace() string

func (*RentIPRequest) ProtoMessage

func (*RentIPRequest) ProtoMessage()

func (*RentIPRequest) ProtoReflect

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

func (*RentIPRequest) Reset

func (x *RentIPRequest) Reset()

func (*RentIPRequest) String

func (x *RentIPRequest) String() string

type RentIPResponse

type RentIPResponse struct {
	IPv4CIDR string `protobuf:"bytes,1,opt,name=IPv4CIDR,proto3" json:"IPv4CIDR,omitempty"`
	IPv6CIDR string `protobuf:"bytes,2,opt,name=IPv6CIDR,proto3" json:"IPv6CIDR,omitempty"`
	// contains filtered or unexported fields
}

func (*RentIPResponse) Descriptor deprecated

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

Deprecated: Use RentIPResponse.ProtoReflect.Descriptor instead.

func (*RentIPResponse) GetIPv4CIDR

func (x *RentIPResponse) GetIPv4CIDR() string

func (*RentIPResponse) GetIPv6CIDR

func (x *RentIPResponse) GetIPv6CIDR() string

func (*RentIPResponse) ProtoMessage

func (*RentIPResponse) ProtoMessage()

func (*RentIPResponse) ProtoReflect

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

func (*RentIPResponse) Reset

func (x *RentIPResponse) Reset()

func (*RentIPResponse) String

func (x *RentIPResponse) String() string

type UnimplementedDHCPServer

type UnimplementedDHCPServer struct {
}

UnimplementedDHCPServer must be embedded to have forward compatible implementations.

func (UnimplementedDHCPServer) ReleaseIP

func (UnimplementedDHCPServer) RentIP

type UnsafeDHCPServer

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

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

Jump to

Keyboard shortcuts

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