Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lease ¶
type Lease struct { EnableIPv4 bool EnableIPv6 bool Subnet ip.IP4Net IPv6Subnet ip.IP6Net Attrs LeaseAttrs Expiration time.Time Asof int64 //Only used in etcd }
Lease includes information about the lease
type LeaseAttrs ¶
type LeaseAttrs struct { PublicIP ip.IP4 PublicIPv6 *ip.IP6 BackendType string `json:",omitempty"` BackendData json.RawMessage `json:",omitempty"` BackendV6Data json.RawMessage `json:",omitempty"` }
LeaseAttrs includes extra information for the lease
type LeaseWatchResult ¶
type LeaseWatchResult struct { // Either Events or Snapshot will be set. If Events is empty, it means // the cursor was out of range and Snapshot contains the current list // of items, even if empty. Events []Event `json:"events"` Snapshot []Lease `json:"snapshot"` //Only used in etcd Cursor interface{} `json:"cursor"` //Only used in etcd }
type LeaseWatcher ¶
type LeaseWatcher struct { OwnLease *Lease //Lease with the subnet of the local node Leases []Lease //Leases with subnets from other nodes }
func (*LeaseWatcher) Reset ¶
func (lw *LeaseWatcher) Reset(leases []Lease) []Event
Reset is called by etcd-subnet when using a snapshot
func (*LeaseWatcher) Update ¶
func (lw *LeaseWatcher) Update(events []Event) []Event
Update reads the leases in the events and depending on Type, adds them or removes them
Click to show internal directories.
Click to hide internal directories.