Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- type Config
- type MultiTopology
- func (t *MultiTopology) CalculateExpectedNumber(readyNodes int) int
- func (t *MultiTopology) GenerateBGPPeers(routeReflectors []corev1.Node, nodes map[*corev1.Node]bool, ...) []calicoApi.BGPPeer
- func (t *MultiTopology) GetClusterID(nodeID string, seed int64) string
- func (t *MultiTopology) GetNodeLabel(nodeID string) (string, string)
- func (t *MultiTopology) IsRouteReflector(nodeID string, labels map[string]string) bool
- func (t *MultiTopology) NewNodeListOptions(nodeLabels map[string]string) client.ListOptions
- type SingleTopology
- func (t *SingleTopology) CalculateExpectedNumber(readyNodes int) int
- func (t *SingleTopology) GenerateBGPPeers(_ []corev1.Node, _ map[*corev1.Node]bool, existingPeers *calicoApi.BGPPeerList) []calicoApi.BGPPeer
- func (t *SingleTopology) GetClusterID(string, int64) string
- func (t *SingleTopology) GetNodeLabel(string) (string, string)
- func (t *SingleTopology) IsRouteReflector(_ string, labels map[string]string) bool
- func (t *SingleTopology) NewNodeListOptions(nodeLabels map[string]string) client.ListOptions
- type Topology
Constants ¶
const ( // TODO Make it configurable DefaultRouteReflectorMeshName = "rrs-to-rrs" DefaultRouteReflectorClientName = "peer-to-rrs-%d" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiTopology ¶
type MultiTopology struct { Config // contains filtered or unexported fields }
func (*MultiTopology) CalculateExpectedNumber ¶
func (t *MultiTopology) CalculateExpectedNumber(readyNodes int) int
func (*MultiTopology) GenerateBGPPeers ¶
func (t *MultiTopology) GenerateBGPPeers(routeReflectors []corev1.Node, nodes map[*corev1.Node]bool, existingPeers *calicoApi.BGPPeerList) []calicoApi.BGPPeer
func (*MultiTopology) GetClusterID ¶
func (t *MultiTopology) GetClusterID(nodeID string, seed int64) string
func (*MultiTopology) GetNodeLabel ¶
func (t *MultiTopology) GetNodeLabel(nodeID string) (string, string)
func (*MultiTopology) IsRouteReflector ¶
func (t *MultiTopology) IsRouteReflector(nodeID string, labels map[string]string) bool
func (*MultiTopology) NewNodeListOptions ¶
func (t *MultiTopology) NewNodeListOptions(nodeLabels map[string]string) client.ListOptions
type SingleTopology ¶
type SingleTopology struct {
Config
}
func (*SingleTopology) CalculateExpectedNumber ¶
func (t *SingleTopology) CalculateExpectedNumber(readyNodes int) int
func (*SingleTopology) GenerateBGPPeers ¶
func (t *SingleTopology) GenerateBGPPeers(_ []corev1.Node, _ map[*corev1.Node]bool, existingPeers *calicoApi.BGPPeerList) []calicoApi.BGPPeer
func (*SingleTopology) GetClusterID ¶
func (t *SingleTopology) GetClusterID(string, int64) string
func (*SingleTopology) GetNodeLabel ¶
func (t *SingleTopology) GetNodeLabel(string) (string, string)
func (*SingleTopology) IsRouteReflector ¶
func (t *SingleTopology) IsRouteReflector(_ string, labels map[string]string) bool
func (*SingleTopology) NewNodeListOptions ¶
func (t *SingleTopology) NewNodeListOptions(nodeLabels map[string]string) client.ListOptions
type Topology ¶
type Topology interface { IsRouteReflector(string, map[string]string) bool GetClusterID(string, int64) string GetNodeLabel(string) (string, string) NewNodeListOptions(labels map[string]string) client.ListOptions CalculateExpectedNumber(int) int GenerateBGPPeers([]corev1.Node, map[*corev1.Node]bool, *calicoApi.BGPPeerList) []calicoApi.BGPPeer }