...

Source file src/k8s.io/kubernetes/pkg/kubelet/util/util_unsupported.go

Documentation: k8s.io/kubernetes/pkg/kubelet/util

     1  //go:build !freebsd && !linux && !windows && !darwin
     2  // +build !freebsd,!linux,!windows,!darwin
     3  
     4  /*
     5  Copyright 2017 The Kubernetes Authors.
     6  
     7  Licensed under the Apache License, Version 2.0 (the "License");
     8  you may not use this file except in compliance with the License.
     9  You may obtain a copy of the License at
    10  
    11      http://www.apache.org/licenses/LICENSE-2.0
    12  
    13  Unless required by applicable law or agreed to in writing, software
    14  distributed under the License is distributed on an "AS IS" BASIS,
    15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    16  See the License for the specific language governing permissions and
    17  limitations under the License.
    18  */
    19  
    20  package util
    21  
    22  import (
    23  	"context"
    24  	"fmt"
    25  	"net"
    26  	"time"
    27  )
    28  
    29  // CreateListener creates a listener on the specified endpoint.
    30  func CreateListener(endpoint string) (net.Listener, error) {
    31  	return nil, fmt.Errorf("CreateListener is unsupported in this build")
    32  }
    33  
    34  // GetAddressAndDialer returns the address parsed from the given endpoint and a context dialer.
    35  func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error) {
    36  	return "", nil, fmt.Errorf("GetAddressAndDialer is unsupported in this build")
    37  }
    38  
    39  // LockAndCheckSubPath empty implementation
    40  func LockAndCheckSubPath(volumePath, subPath string) ([]uintptr, error) {
    41  	return []uintptr{}, nil
    42  }
    43  
    44  // UnlockPath empty implementation
    45  func UnlockPath(fileHandles []uintptr) {
    46  }
    47  
    48  // LocalEndpoint empty implementation
    49  func LocalEndpoint(path, file string) (string, error) {
    50  	return "", fmt.Errorf("LocalEndpoints are unsupported in this build")
    51  }
    52  
    53  // GetBootTime empty implementation
    54  func GetBootTime() (time.Time, error) {
    55  	return time.Time{}, fmt.Errorf("GetBootTime is unsupported in this build")
    56  }
    57  

View as plain text