Documentation ¶
Index ¶
- func ApplyEndPointSliceWithRetry(client kubernetes.Interface, slice *discoveryv1.EndpointSlice) error
- func ContainsPrefix(slice []string, s string) bool
- func ContainsString(slice []string, s string) bool
- func CopyStrings(s []string) []string
- func CreateKubeConfigWithToken(serverURL, token string, caCert []byte) *clientcmdapi.Config
- func DerivedName(clusterID, namespace, seName string) string
- func GenerateKubeConfigFromToken(serverURL, token string, caCert []byte) (*rest.Config, error)
- func MaxInt(a, b int) int
- func MaxInt32(a, b int32) int32
- func MinInt(a, b int) int
- func MinInt32(a, b int32) int32
- func RemoveNonexistentEndpointslice(srcLister discoverylisterv1.EndpointSliceLister, srcClusterID string, ...) ([]*discoveryv1.EndpointSlice, error)
- func RemoveString(slice []string, s string) []string
- func ResourceNeedResync(current pkgruntime.Object, modified pkgruntime.Object, ignoreAdd bool) bool
- func SortStrings(s []string) []string
- func SumArrayInt32(array []int32) (sum int32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyEndPointSliceWithRetry ¶
func ApplyEndPointSliceWithRetry(client kubernetes.Interface, slice *discoveryv1.EndpointSlice) error
ApplyEndPointSliceWithRetry create or update existed slices.
func ContainsPrefix ¶
ContainsPrefix checks if a given slice of strings start with the provided string.
func ContainsString ¶
ContainsString checks if a given slice of strings contains the provided string.
func CopyStrings ¶
CopyStrings copies the contents of the specified string slice into a new slice.
func CreateKubeConfigWithToken ¶
func CreateKubeConfigWithToken(serverURL, token string, caCert []byte) *clientcmdapi.Config
CreateKubeConfigWithToken creates a KubeConfig object with access to the API server with a token
func DerivedName ¶
func GenerateKubeConfigFromToken ¶
GenerateKubeConfigFromToken composes a kubeconfig from token
func RemoveNonexistentEndpointslice ¶
func RemoveNonexistentEndpointslice( srcLister discoverylisterv1.EndpointSliceLister, srcClusterID string, srcNamespace string, labelMap labels.Set, targetClient kubernetes.Interface, targetNamespace string, dstLabelMap labels.Set, ) ([]*discoveryv1.EndpointSlice, error)
func RemoveString ¶
RemoveString returns a newly created []string that contains all items from slice that are not equal to s.
func ResourceNeedResync ¶
func ResourceNeedResync(current pkgruntime.Object, modified pkgruntime.Object, ignoreAdd bool) bool
current is deployed resource, modified is changed resource. ignoreAdd is true if you want to ignore add action. The function will return the bool value to indicate whether to sync back the current object.
func SortStrings ¶
SortStrings sorts the specified string slice in place. It returns the same slice that was provided in order to facilitate method chaining.
func SumArrayInt32 ¶
Types ¶
This section is empty.