Documentation ¶
Overview ¶
Copyright 2021 The Hybridnet Authors.
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.
Copyright 2021 The Hybridnet Authors.
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
- func BuildClusterConfig(rc *networkingv1.RemoteCluster) (*restclient.Config, error)
- func CheckStringSliceDifferent(a, b []string) bool
- func GenRemoteSubnetName(clusterName string, subnetName string) string
- func GenRemoteVtepName(clusterName string, nodeName string) string
- func GetUUID(client kubernetes.Interface) (types.UID, error)
- func GetUUIDFromRemoteCluster(rc *networkingv1.RemoteCluster) (types.UID, error)
- func Intersect(rangeA *networkingv1.AddressRange, rangeB *networkingv1.AddressRange) bool
- func LastIP(subnet *net.IPNet) net.IP
- func NewRemoteVtep(clusterName string, uid types.UID, vtepIP string, macAddr string, ...) *networkingv1.RemoteVtep
- func NormalizedIP(ip string) string
- func ParseBoolOrDefault(in string, defaultValue bool) bool
- func PickFirstNonEmptyString(ss ...string) string
- func SelectorClusterName(clusterName string) labels.Selector
- func StringSliceToMap(in []string) (out map[string]struct{})
- func StringToIPNet(in string) *net.IPNet
- func ToJSONString(i interface{}) string
- type RemoteSubnetName
Constants ¶
const ( KubeAPIQPS = 20.0 KubeAPIBurst = 30 )
Variables ¶
This section is empty.
Functions ¶
func BuildClusterConfig ¶ added in v0.3.0
func BuildClusterConfig(rc *networkingv1.RemoteCluster) (*restclient.Config, error)
func CheckStringSliceDifferent ¶ added in v0.3.0
CheckStringSliceDifferent returns if two string slice contains different item, return true for two string slices are different.
func GenRemoteSubnetName ¶ added in v0.3.0
func GenRemoteVtepName ¶ added in v0.3.0
func GetUUIDFromRemoteCluster ¶ added in v0.3.0
func GetUUIDFromRemoteCluster(rc *networkingv1.RemoteCluster) (types.UID, error)
func Intersect ¶ added in v0.3.0
func Intersect(rangeA *networkingv1.AddressRange, rangeB *networkingv1.AddressRange) bool
Intersect returns if ip address range of rangeA is overlapped with rangeB.
func LastIP ¶ added in v0.3.0
LastIP Determine the last IP of a subnet, excluding the broadcast if IPv4
func NewRemoteVtep ¶ added in v0.3.0
func NewRemoteVtep(clusterName string, uid types.UID, vtepIP string, macAddr string, nodeLocalVxlanIPList string, nodeName string, endpointIPList []string) *networkingv1.RemoteVtep
func NormalizedIP ¶
NormalizedIP If IP is valid, return itself otherwise empty string
func ParseBoolOrDefault ¶
func PickFirstNonEmptyString ¶
func SelectorClusterName ¶ added in v0.3.0
func StringSliceToMap ¶
func StringToIPNet ¶
func ToJSONString ¶ added in v0.3.0
func ToJSONString(i interface{}) string
Types ¶
type RemoteSubnetName ¶ added in v0.3.0
type RemoteSubnetName string