ipprovider

package
Version: v0.2.3-vl3 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*IpFamily) GetFamily

func (m *IpFamily) GetFamily() IpFamily_Family

func (*IpFamily) GetFamilyString

func (m *IpFamily) GetFamilyString() string

func (*IpFamily) ProtoMessage

func (*IpFamily) ProtoMessage()

func (*IpFamily) Reset

func (m *IpFamily) Reset()

func (*IpFamily) String

func (m *IpFamily) String() string

func (*IpFamily) XXX_DiscardUnknown

func (m *IpFamily) XXX_DiscardUnknown()

func (*IpFamily) XXX_Marshal

func (m *IpFamily) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IpFamily) XXX_Merge

func (m *IpFamily) XXX_Merge(src proto.Message)

func (*IpFamily) XXX_Size

func (m *IpFamily) XXX_Size() int

func (*IpFamily) XXX_Unmarshal

func (m *IpFamily) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*IpPrefix) GetAddrFamily

func (m *IpPrefix) GetAddrFamily() *IpFamily

func (*IpPrefix) GetSubnet

func (m *IpPrefix) GetSubnet() string

func (*IpPrefix) ProtoMessage

func (*IpPrefix) ProtoMessage()

func (*IpPrefix) Reset

func (m *IpPrefix) Reset()

func (*IpPrefix) String

func (m *IpPrefix) String() string

func (*IpPrefix) ToIpNet

func (m *IpPrefix) ToIpNet() *net.IPNet

func (*IpPrefix) Validate

func (m *IpPrefix) Validate() error

func (*IpPrefix) XXX_DiscardUnknown

func (m *IpPrefix) XXX_DiscardUnknown()

func (*IpPrefix) XXX_Marshal

func (m *IpPrefix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IpPrefix) XXX_Merge

func (m *IpPrefix) XXX_Merge(src proto.Message)

func (*IpPrefix) XXX_Size

func (m *IpPrefix) XXX_Size() int

func (*IpPrefix) XXX_Unmarshal

func (m *IpPrefix) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Subnet) GetIdentifier

func (m *Subnet) GetIdentifier() *Identifier

func (*Subnet) GetLeaseTimeout

func (m *Subnet) GetLeaseTimeout() int32

func (*Subnet) GetPrefix

func (m *Subnet) GetPrefix() *IpPrefix

func (*Subnet) ProtoMessage

func (*Subnet) ProtoMessage()

func (*Subnet) Reset

func (m *Subnet) Reset()

func (*Subnet) String

func (m *Subnet) String() string

func (*Subnet) Validate

func (m *Subnet) Validate() error

func (*Subnet) XXX_DiscardUnknown

func (m *Subnet) XXX_DiscardUnknown()

func (*Subnet) XXX_Marshal

func (m *Subnet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Subnet) XXX_Merge

func (m *Subnet) XXX_Merge(src proto.Message)

func (*Subnet) XXX_Size

func (m *Subnet) XXX_Size() int

func (*Subnet) XXX_Unmarshal

func (m *Subnet) XXX_Unmarshal(b []byte) error

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) FreeSubnet(ctx context.Context, req *Subnet) (*Empty, error)

func (*UnimplementedAllocatorServer) RenewSubnetLease

func (*UnimplementedAllocatorServer) RenewSubnetLease(ctx context.Context, req *Subnet) (*Subnet, error)

Jump to

Keyboard shortcuts

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