Documentation
¶
Index ¶
- Constants
- Variables
- func CreateDest(dest string) error
- func Finish(result Result)
- func FinishError(message string)
- func GetDefaultAK() (string, string, string)
- func GetLocalAK() (string, string)
- func GetLocalSystemAK() (string, string)
- func GetMetaData(resource string) (string, error)
- func GetRegionAndInstanceId() (string, string, error)
- func GetRegionIdAndInstanceId(nodeName string) (string, string, error)
- func GetSTSAK() (string, string, string)
- func IsFileExisting(filename string) bool
- func IsLikelyNotMountPoint(file string) (bool, error)
- func IsMounted(mountPath string) bool
- func PathExists(path string) (bool, error)
- func PluginVersion() string
- func ReadJsonFile(file string) (map[string]string, error)
- func Run(cmd string) (string, error)
- func Umount(mountPath string) bool
- func Usage()
- func WriteJosnFile(obj interface{}, file string) error
- type DefaultOptions
- type Result
Constants ¶
View Source
const ( USER_AKID = "/etc/.volumeak/akId" USER_AKSECRET = "/etc/.volumeak/akSecret" METADATA_URL = "http://100.100.100.200/latest/meta-data/" REGIONID_TAG = "region-id" INSTANCEID_TAG = "instance-id" )
const values
Variables ¶
View Source
var ( // VERSION should be updated by hand at each release VERSION = "v1.12.6" // GITCOMMIT will be overwritten automatically by the build system GITCOMMIT = "HEAD" )
Functions ¶
func GetDefaultAK ¶
GetDefaultAK read default ak from local file or from STS
func GetLocalAK ¶
GetLocalAK read ossfs ak from local or from secret file
func GetLocalSystemAK ¶
GetLocalSystemAK get local access key
func GetRegionAndInstanceId ¶
GetRegionAndInstanceId Get regionid instanceid;
func GetRegionIdAndInstanceId ¶
GetRegionIdAndInstanceId get region id instance id
func IsFileExisting ¶
IsFileExisting check file exist in volume driver;
func IsLikelyNotMountPoint ¶
IsLikelyNotMountPoint check is mountpoint or not
func PathExists ¶
PathExists returns true if the specified path exists.
func ReadJsonFile ¶
ReadJsonFile parse json to struct
func WriteJosnFile ¶
WriteJosnFile save json data to file
Types ¶
type DefaultOptions ¶
type DefaultOptions struct { Global struct { KubernetesClusterTag string AccessKeyID string `json:"accessKeyID"` AccessKeySecret string `json:"accessKeySecret"` Region string `json:"region"` } }
DefaultOptions used for global ak
Click to show internal directories.
Click to hide internal directories.