github.com/google/cadvisor@v0.49.1/nvm/machine_no_libipmctl.go (about)

     1  //go:build !libipmctl || !cgo
     2  // +build !libipmctl !cgo
     3  
     4  // Copyright 2020 Google Inc. All Rights Reserved.
     5  //
     6  // Licensed under the Apache License, Version 2.0 (the "License");
     7  // you may not use this file except in compliance with the License.
     8  // You may obtain a copy of the License at
     9  //
    10  //     http://www.apache.org/licenses/LICENSE-2.0
    11  //
    12  // Unless required by applicable law or agreed to in writing, software
    13  // distributed under the License is distributed on an "AS IS" BASIS,
    14  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    15  // See the License for the specific language governing permissions and
    16  // limitations under the License.
    17  
    18  package nvm
    19  
    20  import (
    21  	"k8s.io/klog/v2"
    22  
    23  	info "github.com/google/cadvisor/info/v1"
    24  )
    25  
    26  // GetInfo returns information specific for non-volatile memory modules.
    27  // When libipmctl is not available zero value is returned.
    28  func GetInfo() (info.NVMInfo, error) {
    29  	return info.NVMInfo{}, nil
    30  }
    31  
    32  // Finalize un-initializes libipmctl. See https://github.com/google/cadvisor/issues/2457.
    33  // When libipmctl is not available it just logs that it's being called.
    34  func Finalize() {
    35  	klog.V(4).Info("libipmctl not available, doing nothing.")
    36  }