Documentation ¶
Index ¶
- Variables
- func RegisterAllocatorServer(s *grpc.Server, srv AllocatorServer)
- type AllocatorClient
- type AllocatorServer
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)
- func (*Empty) ProtoMessage()
- func (m *Empty) Reset()
- func (m *Empty) String() string
- func (m *Empty) XXX_DiscardUnknown()
- func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Empty) XXX_Merge(src proto.Message)
- func (m *Empty) XXX_Size() int
- func (m *Empty) XXX_Unmarshal(b []byte) error
- type Identifier
- func (*Identifier) Descriptor() ([]byte, []int)
- func (m *Identifier) GetConnectivityDomain() string
- func (m *Identifier) GetFqdn() string
- func (m *Identifier) GetName() string
- func (*Identifier) ProtoMessage()
- func (m *Identifier) Reset()
- func (m *Identifier) String() string
- func (m *Identifier) Validate() error
- func (m *Identifier) XXX_DiscardUnknown()
- func (m *Identifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Identifier) XXX_Merge(src proto.Message)
- func (m *Identifier) XXX_Size() int
- func (m *Identifier) XXX_Unmarshal(b []byte) error
- type IpFamily
- func (*IpFamily) Descriptor() ([]byte, []int)
- func (m *IpFamily) GetFamily() IpFamily_Family
- func (m *IpFamily) GetFamilyString() string
- func (*IpFamily) ProtoMessage()
- func (m *IpFamily) Reset()
- func (m *IpFamily) String() string
- func (m *IpFamily) XXX_DiscardUnknown()
- func (m *IpFamily) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IpFamily) XXX_Merge(src proto.Message)
- func (m *IpFamily) XXX_Size() int
- func (m *IpFamily) XXX_Unmarshal(b []byte) error
- type IpFamily_Family
- type IpPrefix
- func (*IpPrefix) Descriptor() ([]byte, []int)
- func (m *IpPrefix) GetAddrFamily() *IpFamily
- func (m *IpPrefix) GetSubnet() string
- func (*IpPrefix) ProtoMessage()
- func (m *IpPrefix) Reset()
- func (m *IpPrefix) String() string
- func (m *IpPrefix) ToIpNet() *net.IPNet
- func (m *IpPrefix) Validate() error
- func (m *IpPrefix) XXX_DiscardUnknown()
- func (m *IpPrefix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IpPrefix) XXX_Merge(src proto.Message)
- func (m *IpPrefix) XXX_Size() int
- func (m *IpPrefix) XXX_Unmarshal(b []byte) error
- type Subnet
- func (*Subnet) Descriptor() ([]byte, []int)
- func (m *Subnet) GetIdentifier() *Identifier
- func (m *Subnet) GetLeaseTimeout() int32
- func (m *Subnet) GetPrefix() *IpPrefix
- func (*Subnet) ProtoMessage()
- func (m *Subnet) Reset()
- func (m *Subnet) String() string
- func (m *Subnet) Validate() error
- func (m *Subnet) XXX_DiscardUnknown()
- func (m *Subnet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Subnet) XXX_Merge(src proto.Message)
- func (m *Subnet) XXX_Size() int
- func (m *Subnet) XXX_Unmarshal(b []byte) error
- type SubnetRequest
- func (*SubnetRequest) Descriptor() ([]byte, []int)
- func (m *SubnetRequest) GetAddrFamily() *IpFamily
- func (m *SubnetRequest) GetIdentifier() *Identifier
- func (m *SubnetRequest) GetPrefixLen() uint32
- func (*SubnetRequest) ProtoMessage()
- func (m *SubnetRequest) Reset()
- func (m *SubnetRequest) String() string
- func (m *SubnetRequest) Validate() error
- func (m *SubnetRequest) XXX_DiscardUnknown()
- func (m *SubnetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubnetRequest) XXX_Merge(src proto.Message)
- func (m *SubnetRequest) XXX_Size() int
- func (m *SubnetRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedAllocatorServer
- func (*UnimplementedAllocatorServer) AllocateSubnet(ctx context.Context, req *SubnetRequest) (*Subnet, error)
- func (*UnimplementedAllocatorServer) FreeSubnet(ctx context.Context, req *Subnet) (*Empty, error)
- func (*UnimplementedAllocatorServer) RenewSubnetLease(ctx context.Context, req *Subnet) (*Subnet, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var IpFamily_Family_name = map[int32]string{
0: "IPV4",
1: "IPV6",
}
View Source
var IpFamily_Family_value = map[string]int32{
"IPV4": 0,
"IPV6": 1,
}
Functions ¶
func RegisterAllocatorServer ¶
func RegisterAllocatorServer(s *grpc.Server, srv AllocatorServer)
Types ¶
type AllocatorClient ¶
type AllocatorClient interface { AllocateSubnet(ctx context.Context, in *SubnetRequest, opts ...grpc.CallOption) (*Subnet, error) FreeSubnet(ctx context.Context, in *Subnet, opts ...grpc.CallOption) (*Empty, error) RenewSubnetLease(ctx context.Context, in *Subnet, opts ...grpc.CallOption) (*Subnet, error) }
AllocatorClient is the client API for Allocator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAllocatorClient ¶
func NewAllocatorClient(cc *grpc.ClientConn) AllocatorClient
type AllocatorServer ¶
type AllocatorServer interface { AllocateSubnet(context.Context, *SubnetRequest) (*Subnet, error) FreeSubnet(context.Context, *Subnet) (*Empty, error) RenewSubnetLease(context.Context, *Subnet) (*Subnet, error) }
AllocatorServer is the server API for Allocator service.
type Empty ¶
type Empty struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) XXX_DiscardUnknown ¶
func (m *Empty) XXX_DiscardUnknown()
func (*Empty) XXX_Marshal ¶
func (*Empty) XXX_Unmarshal ¶
type Identifier ¶
type Identifier struct { Fqdn string `protobuf:"bytes,1,opt,name=fqdn,proto3" json:"fqdn,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` ConnectivityDomain string `protobuf:"bytes,3,opt,name=connectivity_domain,json=connectivityDomain,proto3" json:"connectivity_domain,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Identifier) Descriptor ¶
func (*Identifier) Descriptor() ([]byte, []int)
func (*Identifier) GetConnectivityDomain ¶
func (m *Identifier) GetConnectivityDomain() string
func (*Identifier) GetFqdn ¶
func (m *Identifier) GetFqdn() string
func (*Identifier) GetName ¶
func (m *Identifier) GetName() string
func (*Identifier) ProtoMessage ¶
func (*Identifier) ProtoMessage()
func (*Identifier) Reset ¶
func (m *Identifier) Reset()
func (*Identifier) String ¶
func (m *Identifier) String() string
func (*Identifier) Validate ¶
func (m *Identifier) Validate() error
func (*Identifier) XXX_DiscardUnknown ¶
func (m *Identifier) XXX_DiscardUnknown()
func (*Identifier) XXX_Marshal ¶
func (m *Identifier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Identifier) XXX_Merge ¶
func (m *Identifier) XXX_Merge(src proto.Message)
func (*Identifier) XXX_Size ¶
func (m *Identifier) XXX_Size() int
func (*Identifier) XXX_Unmarshal ¶
func (m *Identifier) XXX_Unmarshal(b []byte) error
type IpFamily ¶
type IpFamily struct { Family IpFamily_Family `protobuf:"varint,1,opt,name=family,proto3,enum=ippool.IpFamily_Family" json:"family,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IpFamily) Descriptor ¶
func (*IpFamily) GetFamily ¶
func (m *IpFamily) GetFamily() IpFamily_Family
func (*IpFamily) GetFamilyString ¶
func (*IpFamily) ProtoMessage ¶
func (*IpFamily) ProtoMessage()
func (*IpFamily) XXX_DiscardUnknown ¶
func (m *IpFamily) XXX_DiscardUnknown()
func (*IpFamily) XXX_Marshal ¶
func (*IpFamily) XXX_Unmarshal ¶
type IpFamily_Family ¶
type IpFamily_Family int32
const ( IpFamily_IPV4 IpFamily_Family = 0 IpFamily_IPV6 IpFamily_Family = 1 )
func (IpFamily_Family) EnumDescriptor ¶
func (IpFamily_Family) EnumDescriptor() ([]byte, []int)
func (IpFamily_Family) String ¶
func (x IpFamily_Family) String() string
type IpPrefix ¶
type IpPrefix struct { AddrFamily *IpFamily `protobuf:"bytes,1,opt,name=addr_family,json=addrFamily,proto3" json:"addr_family,omitempty"` Subnet string `protobuf:"bytes,2,opt,name=subnet,proto3" json:"subnet,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IpPrefix) Descriptor ¶
func (*IpPrefix) GetAddrFamily ¶
func (*IpPrefix) ProtoMessage ¶
func (*IpPrefix) ProtoMessage()
func (*IpPrefix) XXX_DiscardUnknown ¶
func (m *IpPrefix) XXX_DiscardUnknown()
func (*IpPrefix) XXX_Marshal ¶
func (*IpPrefix) XXX_Unmarshal ¶
type Subnet ¶
type Subnet struct { Identifier *Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` Prefix *IpPrefix `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` LeaseTimeout int32 `protobuf:"varint,3,opt,name=lease_timeout,json=leaseTimeout,proto3" json:"lease_timeout,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Subnet) Descriptor ¶
func (*Subnet) GetIdentifier ¶
func (m *Subnet) GetIdentifier() *Identifier
func (*Subnet) GetLeaseTimeout ¶
func (*Subnet) ProtoMessage ¶
func (*Subnet) ProtoMessage()
func (*Subnet) XXX_DiscardUnknown ¶
func (m *Subnet) XXX_DiscardUnknown()
func (*Subnet) XXX_Marshal ¶
func (*Subnet) XXX_Unmarshal ¶
type SubnetRequest ¶
type SubnetRequest struct { Identifier *Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` AddrFamily *IpFamily `protobuf:"bytes,2,opt,name=addr_family,json=addrFamily,proto3" json:"addr_family,omitempty"` PrefixLen uint32 `protobuf:"varint,3,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SubnetRequest) Descriptor ¶
func (*SubnetRequest) Descriptor() ([]byte, []int)
func (*SubnetRequest) GetAddrFamily ¶
func (m *SubnetRequest) GetAddrFamily() *IpFamily
func (*SubnetRequest) GetIdentifier ¶
func (m *SubnetRequest) GetIdentifier() *Identifier
func (*SubnetRequest) GetPrefixLen ¶
func (m *SubnetRequest) GetPrefixLen() uint32
func (*SubnetRequest) ProtoMessage ¶
func (*SubnetRequest) ProtoMessage()
func (*SubnetRequest) Reset ¶
func (m *SubnetRequest) Reset()
func (*SubnetRequest) String ¶
func (m *SubnetRequest) String() string
func (*SubnetRequest) Validate ¶
func (m *SubnetRequest) Validate() error
func (*SubnetRequest) XXX_DiscardUnknown ¶
func (m *SubnetRequest) XXX_DiscardUnknown()
func (*SubnetRequest) XXX_Marshal ¶
func (m *SubnetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubnetRequest) XXX_Merge ¶
func (m *SubnetRequest) XXX_Merge(src proto.Message)
func (*SubnetRequest) XXX_Size ¶
func (m *SubnetRequest) XXX_Size() int
func (*SubnetRequest) XXX_Unmarshal ¶
func (m *SubnetRequest) XXX_Unmarshal(b []byte) error
type UnimplementedAllocatorServer ¶
type UnimplementedAllocatorServer struct { }
UnimplementedAllocatorServer can be embedded to have forward compatible implementations.
func (*UnimplementedAllocatorServer) AllocateSubnet ¶
func (*UnimplementedAllocatorServer) AllocateSubnet(ctx context.Context, req *SubnetRequest) (*Subnet, error)
func (*UnimplementedAllocatorServer) FreeSubnet ¶
func (*UnimplementedAllocatorServer) RenewSubnetLease ¶
Click to show internal directories.
Click to hide internal directories.