Documentation ¶
Overview ¶
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2024, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
- Variables
- func DefaultStrategyName() string
- func DriverNames() []string
- func FindFreeNetwork(pool NetworkPool, existingNetworks *networkapi.NetworkList) (*net.IPNet, error)
- func NetworksIntersect(a, b net.IPNet) bool
- func NewNetworkV1alpha1ServiceIterator(ctx context.Context) (networkv1alpha1.NetworkService, error)
- func Strategies() map[string]*Strategy
- type NetworkPool
- type NetworkPoolEntry
- type NewStrategyConstructor
- type Strategy
Constants ¶
This section is empty.
Variables ¶
var DefaultNetworkPool = []NetworkPoolEntry{
{"172.17.0.0/16", 16},
{"172.18.0.0/16", 16},
{"172.19.0.0/16", 16},
{"172.20.0.0/14", 16},
{"172.24.0.0/14", 16},
{"172.28.0.0/14", 16},
{"192.168.0.0/16", 20},
}
Functions ¶
func DefaultStrategyName ¶ added in v0.8.0
func DefaultStrategyName() string
DefaultStrategyName return the name of the default strategy of the platform.
func DriverNames ¶
func DriverNames() []string
DriverNames returns the list of registered platform driver implementation names.
func FindFreeNetwork ¶ added in v0.7.11
func FindFreeNetwork(pool NetworkPool, existingNetworks *networkapi.NetworkList) (*net.IPNet, error)
FindFreeNetwork finds a free network in the pool.
func NetworksIntersect ¶ added in v0.7.11
NetworksIntersect returns whether two networks have any common IP addresses.
func NewNetworkV1alpha1ServiceIterator ¶ added in v0.7.3
func NewNetworkV1alpha1ServiceIterator(ctx context.Context) (networkv1alpha1.NetworkService, error)
NewNetworkV1alpha1ServiceIterator returns a networkv1alpha1.NetworkService-compatible implementation which iterates over each supported network driver and calls the representing method. This is useful in circumstances where the driver is not supplied. The first network driver to succeed is returned in all circumstances.
func Strategies ¶
Strategies returns the list of registered platform implementations.
Types ¶
type NetworkPool ¶ added in v0.7.11
type NetworkPool []NetworkPoolEntry
type NetworkPoolEntry ¶ added in v0.7.11
type NetworkPoolEntry struct { // Subnet is the CIDR notation of the network to be sub-divided. Subnet string // Size is the size of the subnets to be allocated, in bits. Size int }
NetworkPoolEntry describes a network to be used for allocating IP ranges.
type NewStrategyConstructor ¶
NewStrategyConstructor is a prototype for the instantiation function of a platform driver implementation.
type Strategy ¶
type Strategy struct { Name string NewNetworkV1alpha1 NewStrategyConstructor[networkv1alpha1.NetworkService] }
Strategy represents canonical reference of a machine driver and their platform.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors.
|
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. |
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors.
|
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2022, Unikraft GmbH and The KraftKit Authors. |