v1

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Ipam_Allocate_FullMethodName = "/ipam.v1.Ipam/Allocate"
	Ipam_Release_FullMethodName  = "/ipam.v1.Ipam/Release"
)

Variables

View Source
var (
	IPFamily_name = map[int32]string{
		0: "IPV4",
		1: "IPV6",
	}
	IPFamily_value = map[string]int32{
		"IPV4": 0,
		"IPV6": 1,
	}
)

Enum value maps for IPFamily.

View Source
var File_api_ipam_v1_ipam_proto protoreflect.FileDescriptor
View Source
var Ipam_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ipam.v1.Ipam",
	HandlerType: (*IpamServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Allocate",
			Handler:    _Ipam_Allocate_Handler,
		},
		{
			MethodName: "Release",
			Handler:    _Ipam_Release_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/ipam/v1/ipam.proto",
}

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

Functions

func RegisterIpamServer

func RegisterIpamServer(s grpc.ServiceRegistrar, srv IpamServer)

Types

type Child

type Child struct {
	Name   string  `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Subnet *Subnet `protobuf:"bytes,2,opt,name=subnet,proto3" json:"subnet,omitempty"`
	// contains filtered or unexported fields
}

func (*Child) Descriptor deprecated

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

Deprecated: Use Child.ProtoReflect.Descriptor instead.

func (*Child) GetName

func (x *Child) GetName() string

func (*Child) GetSubnet

func (x *Child) GetSubnet() *Subnet

func (*Child) ProtoMessage

func (*Child) ProtoMessage()

func (*Child) ProtoReflect

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

func (*Child) Reset

func (x *Child) Reset()

func (*Child) String

func (x *Child) String() string

type IPFamily

type IPFamily int32
const (
	IPFamily_IPV4 IPFamily = 0
	IPFamily_IPV6 IPFamily = 1
)

func (IPFamily) Descriptor

func (IPFamily) Descriptor() protoreflect.EnumDescriptor

func (IPFamily) Enum

func (x IPFamily) Enum() *IPFamily

func (IPFamily) EnumDescriptor deprecated

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

Deprecated: Use IPFamily.Descriptor instead.

func (IPFamily) Number

func (x IPFamily) Number() protoreflect.EnumNumber

func (IPFamily) String

func (x IPFamily) String() string

func (IPFamily) Type

type IpamClient

type IpamClient interface {
	Allocate(ctx context.Context, in *Child, opts ...grpc.CallOption) (*Prefix, error)
	Release(ctx context.Context, in *Child, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

IpamClient is the client API for Ipam 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 NewIpamClient

func NewIpamClient(cc grpc.ClientConnInterface) IpamClient

type IpamServer

type IpamServer interface {
	Allocate(context.Context, *Child) (*Prefix, error)
	Release(context.Context, *Child) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

IpamServer is the server API for Ipam service. All implementations must embed UnimplementedIpamServer for forward compatibility

type Prefix

type Prefix struct {
	Address      string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	PrefixLength int32  `protobuf:"varint,2,opt,name=prefixLength,proto3" json:"prefixLength,omitempty"`
	// contains filtered or unexported fields
}

func (*Prefix) Descriptor deprecated

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

Deprecated: Use Prefix.ProtoReflect.Descriptor instead.

func (*Prefix) GetAddress

func (x *Prefix) GetAddress() string

func (*Prefix) GetPrefixLength

func (x *Prefix) GetPrefixLength() int32

func (*Prefix) ProtoMessage

func (*Prefix) ProtoMessage()

func (*Prefix) ProtoReflect

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

func (*Prefix) Reset

func (x *Prefix) Reset()

func (*Prefix) String

func (x *Prefix) String() string

func (*Prefix) ToString

func (p *Prefix) ToString() string

type Subnet

type Subnet struct {
	Conduit  *v1.Conduit `protobuf:"bytes,1,opt,name=conduit,proto3" json:"conduit,omitempty"`
	Node     string      `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"`
	IpFamily IPFamily    `protobuf:"varint,3,opt,name=ipFamily,proto3,enum=ipam.v1.IPFamily" json:"ipFamily,omitempty"`
	// contains filtered or unexported fields
}

func (*Subnet) Descriptor deprecated

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

Deprecated: Use Subnet.ProtoReflect.Descriptor instead.

func (*Subnet) GetConduit

func (x *Subnet) GetConduit() *v1.Conduit

func (*Subnet) GetIpFamily

func (x *Subnet) GetIpFamily() IPFamily

func (*Subnet) GetNode

func (x *Subnet) GetNode() string

func (*Subnet) ProtoMessage

func (*Subnet) ProtoMessage()

func (*Subnet) ProtoReflect

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

func (*Subnet) Reset

func (x *Subnet) Reset()

func (*Subnet) String

func (x *Subnet) String() string

func (*Subnet) ToString

func (s *Subnet) ToString() string

type UnimplementedIpamServer

type UnimplementedIpamServer struct {
}

UnimplementedIpamServer must be embedded to have forward compatible implementations.

func (UnimplementedIpamServer) Allocate

func (UnimplementedIpamServer) Release

type UnsafeIpamServer added in v0.8.0

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

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

Jump to

Keyboard shortcuts

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