Add explanations of various claim and allocation fields
This commit is contained in:
1 parent
293abd953e
commit
4e37f5ec42
3 files changed
+9
-8
No files matched your search
+2
-2
@@ -14,9 +14,9 @@ type allocateResult struct {
|
|||||||
|
|
||||||
type allocate struct {
|
type allocate struct {
|
||||||
resultChan chan<- allocateResult
|
resultChan chan<- allocateResult
|
||||||
ident string
|
ident string // a container ID, something like "weave:expose", or api.NoContainerID
|
||||||
r address.CIDR // Subnet we are trying to allocate within
|
r address.CIDR // Subnet we are trying to allocate within
|
||||||
isContainer bool
|
isContainer bool // true if ident is a container ID
|
||||||
hasBeenCancelled func() bool
|
hasBeenCancelled func() bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -76,9 +76,10 @@ type Allocator struct {
|
|||||||
now func() time.Time
|
now func() time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PreClaims are IP addresses discovered before we could initialize IPAM
|
||||||
type PreClaim struct {
|
type PreClaim struct {
|
||||||
Ident string
|
Ident string // a container ID, something like "weave:expose", or api.NoContainerID
|
||||||
IsContainer bool
|
IsContainer bool // true if Ident is a container ID
|
||||||
Cidr address.CIDR
|
Cidr address.CIDR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -12,10 +12,10 @@ import (
|
|||||||
|
|
||||||
type claim struct {
|
type claim struct {
|
||||||
resultChan chan<- error
|
resultChan chan<- error
|
||||||
ident string
|
ident string // a container ID, something like "weave:expose", or api.NoContainerID
|
||||||
cidr address.CIDR
|
cidr address.CIDR // single address being claimed
|
||||||
isContainer bool
|
isContainer bool // true if ident is a container ID
|
||||||
noErrorOnUnknown bool
|
noErrorOnUnknown bool // if false, error or block if we don't know; if true return ok but keep trying
|
||||||
hasBeenCancelled func() bool
|
hasBeenCancelled func() bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user