Documentation ¶
Index ¶
Constants ¶
const Version = "1.1.5"
Version represents the version of coil
Variables ¶
var ErrBlockNotFound = errors.New("block not found")
ErrBlockNotFound is returned when a target block does not exist.
Functions ¶
func ResolveEtcdEndpoints ¶
ResolveEtcdEndpoints checks if an endpoint begins with "@". If such an endpoint exists, it looks for Endpoints resource in "kube-system" namespace.
Suppose an endpoint is "@myetcd". If `kube-system/myetcd` Endpoints exists, then endpoints in cfg is replaced with those defined in the Endpoints resource.
Types ¶
type AddressPool ¶
AddressPool is a collection of subnets
func (AddressPool) MarshalJSON ¶
func (p AddressPool) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*AddressPool) UnmarshalJSON ¶
func (p *AddressPool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler
type BlockAssignment ¶
type BlockAssignment struct { FreeList []*net.IPNet `json:"free"` Nodes map[string][]*net.IPNet `json:"nodes"` }
BlockAssignment holds address block assignment information for a subnet
func EmptyAssignment ¶
func EmptyAssignment(ipnet *net.IPNet, blockSize int) BlockAssignment
EmptyAssignment returns an empty block assignment for ipnet and blockSize.
func (*BlockAssignment) FindBlock ¶
func (ba *BlockAssignment) FindBlock(node string, block *net.IPNet) int
FindBlock returns index of target block
func (BlockAssignment) MarshalJSON ¶
func (ba BlockAssignment) MarshalJSON() ([]byte, error)
MarshalJSON implements Marshaler
func (*BlockAssignment) ReleaseBlock ¶
func (ba *BlockAssignment) ReleaseBlock(node string, block *net.IPNet) error
ReleaseBlock move target block to freeList from target node
func (*BlockAssignment) UnmarshalJSON ¶
func (ba *BlockAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements Unmarshaler