Signed-off-by: bin liu <liubin0329@gmail.com>
| ... | ... |
@@ -31,7 +31,7 @@ func (d *driver) deleteNetwork(nid string) {
|
| 31 | 31 |
d.Unlock() |
| 32 | 32 |
} |
| 33 | 33 |
|
| 34 |
-// getNetworks Safely returns a slice of existng networks |
|
| 34 |
+// getNetworks Safely returns a slice of existing networks |
|
| 35 | 35 |
func (d *driver) getNetworks() []*network {
|
| 36 | 36 |
d.Lock() |
| 37 | 37 |
defer d.Unlock() |
| ... | ... |
@@ -15,7 +15,7 @@ type LeaveCallback func(entries []net.IP) |
| 15 | 15 |
type HostDiscovery interface {
|
| 16 | 16 |
//Watch Node join and leave cluster events |
| 17 | 17 |
Watch(activeCallback ActiveCallback, joinCallback JoinCallback, leaveCallback LeaveCallback) error |
| 18 |
- // StopDiscovery stops the discovery perocess |
|
| 18 |
+ // StopDiscovery stops the discovery process |
|
| 19 | 19 |
StopDiscovery() error |
| 20 | 20 |
// Fetch returns a list of host IPs that are currently discovered |
| 21 | 21 |
Fetch() []net.IP |
| ... | ... |
@@ -26,7 +26,7 @@ type GetCapabilityResponse struct {
|
| 26 | 26 |
RequiresRequestReplay bool |
| 27 | 27 |
} |
| 28 | 28 |
|
| 29 |
-// ToCapability converts the capability response into the internal ipam driver capaility structure |
|
| 29 |
+// ToCapability converts the capability response into the internal ipam driver capability structure |
|
| 30 | 30 |
func (capRes GetCapabilityResponse) ToCapability() *ipamapi.Capability {
|
| 31 | 31 |
return &ipamapi.Capability{
|
| 32 | 32 |
RequiresMACAddress: capRes.RequiresMACAddress, |
| ... | ... |
@@ -63,7 +63,7 @@ func GenerateIfaceName(nlh *netlink.Handle, prefix string, len int) (string, err |
| 63 | 63 |
|
| 64 | 64 |
// ElectInterfaceAddresses looks for an interface on the OS with the |
| 65 | 65 |
// specified name and returns its IPv4 and IPv6 addresses in CIDR |
| 66 |
-// form. If the interface does not exist, it chooses from a predifined |
|
| 66 |
+// form. If the interface does not exist, it chooses from a predefined |
|
| 67 | 67 |
// list the first IPv4 address which does not conflict with other |
| 68 | 68 |
// interfaces on the system. |
| 69 | 69 |
func ElectInterfaceAddresses(name string) (*net.IPNet, []*net.IPNet, error) {
|
| ... | ... |
@@ -94,7 +94,7 @@ func ElectInterfaceAddresses(name string) (*net.IPNet, []*net.IPNet, error) {
|
| 94 | 94 |
} |
| 95 | 95 |
|
| 96 | 96 |
if link == nil || v4Net == nil {
|
| 97 |
- // Choose from predifined broad networks |
|
| 97 |
+ // Choose from predefined broad networks |
|
| 98 | 98 |
v4Net, err = FindAvailableNetwork(ipamutils.PredefinedBroadNetworks) |
| 99 | 99 |
if err != nil {
|
| 100 | 100 |
return nil, nil, err |
| ... | ... |
@@ -131,7 +131,7 @@ func (i *nwIface) Remove() error {
|
| 131 | 131 |
nlh := n.nlHandle |
| 132 | 132 |
n.Unlock() |
| 133 | 133 |
|
| 134 |
- // Find the network inteerface identified by the DstName attribute. |
|
| 134 |
+ // Find the network interface identified by the DstName attribute. |
|
| 135 | 135 |
iface, err := nlh.LinkByName(i.DstName()) |
| 136 | 136 |
if err != nil {
|
| 137 | 137 |
return err |
| ... | ... |
@@ -282,7 +282,7 @@ func (sb *sandbox) updateDNS(ipv6Enabled bool) error {
|
| 282 | 282 |
} |
| 283 | 283 |
|
| 284 | 284 |
// Embedded DNS server has to be enabled for this sandbox. Rebuild the container's |
| 285 |
-// resolv.conf by doing the follwing |
|
| 285 |
+// resolv.conf by doing the following |
|
| 286 | 286 |
// - Save the external name servers in resolv.conf in the sandbox |
| 287 | 287 |
// - Add only the embedded server's IP to container's resolv.conf |
| 288 | 288 |
// - If the embedded server needs any resolv.conf options add it to the current list |