Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer( ctx context.Context, datastore string, trenchName string, nspConn *grpc.ClientConn, cidrs map[ipamAPI.IPFamily]string, prefixLengths map[ipamAPI.IPFamily]*types.PrefixLengths, garbageCollectionEnabled bool, garbageCollectionInterval time.Duration, garbageCollectionThreshold time.Duration) (ipamAPI.IpamServer, error)
NewIpam -
Types ¶
type IpamServer ¶
type IpamServer struct { ipamAPI.UnimplementedIpamServer Trenches map[ipamAPI.IPFamily]types.Trench PrefixLengths map[ipamAPI.IPFamily]*types.PrefixLengths // contains filtered or unexported fields }
func (*IpamServer) Allocate ¶
Note: IMHO ideally all allocations should be treated as leases. Meaning they should be required to be renewed periodically instead of being allocated forever. Would the API be extended so that users could choose between lease or permanent allocation, it would make the cluster upgrade problematic due to the possible mix of old and new clients. Hence, IMHO the best approach for now is to let the server decide which prefixes should have their expirable attribute set. Currently, this translates to calls of node.Allocate() (excluding bridges). The information regarding the time scope is passed in context to avoid the need for changing all the API in between.