Documentation
¶
Index ¶
- Constants
- func Addr2IpPort(addr string) (string, uint32, *cmderror.CmdError)
- func AskConfirmation(promptStr string, confirm string) bool
- func CalcString2Signature(in string, secretKet string) string
- func DisableLogColor()
- func GetDingoFSMountPoints() ([]*mountinfo.MountInfo, *cmderror.CmdError)
- func GetFileInode(path string) (uint64, error)
- func GetIndexSlice(source []string, target []string) []int
- func GetInodesAsString(listFilePath string) (string, error)
- func GetLogger(name string) *logHandle
- func GetString2Signature(date uint64, owner string) string
- func GetTimeofDayUs() (uint64, *cmderror.CmdError)
- func IsAligned(value uint64, alignment uint64) bool
- func IsAlpha(r rune) bool
- func IsDigit(r rune) bool
- func IsHTTPS(endpoint string) bool
- func IsSSL(host string, timeout time.Duration) bool
- func IsUpper(r rune) bool
- func IsValidFsname(fsName string) bool
- func IsValidPath(path string) bool
- func ListMap2ListSortByKeys(rows []map[string]string, headers []string, keys []string) [][]string
- func Map2List(row map[string]string, headers []string) []string
- func Path2DingofsPath(path string, mountpoint *mountinfo.MountInfo) string
- func RemoveDuplicates(strs []string) []string
- func RemoveHTTPPrefix(endpoint string) string
- func RmWitespaceStr(str string) string
- func SetLogID(id string)
- func SetLogLevel(lvl logrus.Level)
- func SetOutFile(name string)
- func SetOutput(w io.Writer)
- func SplitMountpoint(mountpoint string) ([]string, *cmderror.CmdError)
- func StringList2Uint32List(strList []string) ([]uint32, error)
- func StringList2Uint64List(strList []string) ([]uint64, error)
- func SupportANSIColor(fd uintptr) bool
- func ToUnderscoredName(src string) string
- func TranslateCacheGroupMemberState(state mds.CacheGroupMemberState) string
- type RadosChecker
- type S3Checker
- type StorageChecker
Constants ¶
View Source
const ( DINGOFS_MOUNTPOINT_FSTYPE = "fuse.dingofs" DINGOFS_MOUNTPOINT_FSTYPE2 = "fuse" //for backward compatibility )
View Source
const ( ROW_ADDR = "addr" ROW_ALLOC = "alloc" ROW_ALLOC_SIZE = "allocatedSize" ROW_BLOCKSIZE = "blocksize" ROW_CAPACITY = "capacity" ROW_CHILD_LIST = "childList" ROW_CHILD_TYPE = "childType" ROW_CHUNK = "chunk" ROW_CHUNK_SIZE = "chunkSize" ROW_COPYSET = "copyset" ROW_COPYSET_ID = "copysetId" ROW_COPYSET_KEY = "copysetKey" ROW_CREATE_TIME = "create time" ROW_CREATED = "created" ROW_LASTONLINETIME = "last online time" ROW_DUMMY_ADDR = "dummyAddr" ROW_END = "end" ROW_EPOCH = "epoch" ROW_EXPLAIN = "explain" ROW_EXTERNAL_ADDR = "externalAddr" ROW_FILE_NAME = "fileName" ROW_FILE_SIZE = "fileSize" ROW_FILE_TYPE = "fileType" ROW_FS_ID = "fsId" ROW_FS_NAME = "fsName" ROW_FS_CLIENTID = "clientId" ROW_FS_CTO = "cto" ROW_STORAGE_TYPE = "storageType" ROW_STORAGE = "storage" ROW_PARTITION_TYPE = "partitionType" ROW_GROUP = "group" ROW_HOSTNAME = "hostname" ROW_ID = "id" ROW_INODE_ID = "inodeId" ROW_INTERNAL_ADDR = "internalAddr" ROW_IP = "ip" ROW_PORT = "port" ROW_MEMBERID = "memberid" ROW_WEIGHT = "weight" ROW_KEY = "key" ROW_LOCKED = "locked" ROW_OLDLEADER = "oldLeader" ROW_LEADER_PEER = "leaderPeer" ROW_FOLLOWER_PEER = "followerPeer" ROW_LEFT = "left" ROW_LENGTH = "length" ROW_LOCATION = "location" ROW_LOG_GAP = "logGap" ROW_LOGICALPOOL = "logicalpool" ROW_METASERVERID = "metaserverId" ROW_METASERVER = "metaserver" ROW_METASERVER_ADDR = "metaserverAddr" ROW_MOUNT_NUM = "mountNum" ROW_MOUNTPOINT = "mountpoint" ROW_UUID = "uuid" ROW_NAME = "name" ROW_NLINK = "nlink" ROW_NUM = "num" ROW_ONLINE_STATE = "onlineState" ROW_OPERATION = "operation" ROW_OPNAME = "opname" ROW_ORIGINAL_PATH = "originalPath" ROW_OWNER = "owner" ROW_PARENT = "parent" ROW_PARENT_ID = "parentId" ROW_PARTITION_ID = "partitionId" ROW_PEER = "peer" ROW_PEER_ADDR = "peerAddr" ROW_PEER_ID = "peerId" ROW_PEER_NUMBER = "peerNumber" ROW_PHYPOOL = "phyPool" ROW_POOL = "pool" ROW_POOL_ID = "poolId" ROW_READONLY = "readonly" ROW_REASON = "reason" ROW_RECOVERING = "recovering" ROW_RECYCLABLE = "recyclable" ROW_RECYCLE = "recycle" ROW_RESULT = "result" ROW_SCAN = "scan" ROW_SEGMENT = "segment" ROW_SEGMENT_SIZE = "segmentSize" ROW_SEQ = "seq" ROW_SERVERID = "serverid" ROW_SERVER = "server" ROW_SIZE = "size" ROW_START = "start" ROW_STATE = "state" ROW_STATUS = "status" ROW_STRIPE = "stripe" ROW_TERM = "term" ROW_THROTTLE = "throttle" ROW_TOTAL = "total" ROW_TYPE = "type" ROW_USED = "used" ROW_VERSION = "version" ROW_ZONE = "zone" // s3 ROW_S3CHUNKINFO_CHUNKID = "s3ChunkId" ROW_S3CHUNKINFO_LENGTH = "s3Length" ROW_S3CHUNKINFO_OFFSET = "s3Offset" ROW_S3CHUNKINFO_SIZE = "s3Size" // vale ROW_VALUE_ADD = "add" ROW_VALUE_DEL = "del" ROW_VALUE_DNE = "DNE" ROW_VALUE_FAILED = "failed" ROW_VALUE_LOGICAL = "logical" ROW_VALUE_NO_RECOVERING = "" ROW_VALUE_NO_VALUE = "-" ROW_VALUE_NULL = "null" ROW_VALUE_OFFLINE = "offline" ROW_VALUE_ONLINE = "online" ROW_VALUE_PHYSICAL = "physical" ROW_VALUE_RECOVERING_OUT = "recovering from out" ROW_VALUE_SUCCESS = "success" ROW_VALUE_UNKNOWN = "unknown" // quota ROW_PATH = "path" ROW_USED_PERCNET = "use%" ROW_REAL_USED = "realused" ROW_INODES = "inodes" ROW_INODES_IUSED = "iused" ROW_INODES_PERCENT = "iuse%" ROW_INODES_REAL_IUSED = "realiused" //fuse ROW_FUSE_CONNECTION = "CONNECTION" ROW_FUSE_WAITING = "WAITING" //mds ROW_MDS_NUM = "mdsnum" // delete subdir ROW_DELETE_INODES = "delete inodes" )
View Source
const ( TYPE_POOL = "pool" TYPE_SERVER = "server" TYPE_METASERVER = "metaserver" TYPE_ZONE = "zone" TYPE_PHYPOOL = "physicalpool" TYPE_LGPOOL = "logicalpool" )
topology type
View Source
const ( PATH_REGEX = `^(/[^/ ]*)+/?$` FS_NAME_REGEX = "^([a-z0-9]+\\-?)+$" K_STRING_TRUE = "true" ROOT_PATH = "/" RECYCLEBIN_PATH = "/RecycleBin" )
Variables ¶
This section is empty.
Functions ¶
func AskConfirmation ¶
func CalcString2Signature ¶
func DisableLogColor ¶
func DisableLogColor()
func GetDingoFSMountPoints ¶
func GetIndexSlice ¶
func GetInodesAsString ¶
func GetString2Signature ¶
func GetTimeofDayUs ¶
func IsValidFsname ¶
func IsValidPath ¶
func ListMap2ListSortByKeys ¶
func Path2DingofsPath ¶
make sure path' abs path start with mountpoint.MountPoint
func RemoveDuplicates ¶
func RemoveHTTPPrefix ¶
func SetLogLevel ¶
SetLogLevel sets Level to all the loggers in the map
func SetOutFile ¶
func SetOutFile(name string)
func StringList2Uint32List ¶
func StringList2Uint64List ¶
func SupportANSIColor ¶
func ToUnderscoredName ¶
func TranslateCacheGroupMemberState ¶
func TranslateCacheGroupMemberState(state mds.CacheGroupMemberState) string
Types ¶
type RadosChecker ¶
type RadosChecker struct {
// contains filtered or unexported fields
}
func (*RadosChecker) AllHostsUnavailable ¶
func (r *RadosChecker) AllHostsUnavailable() (bool, error)
func (*RadosChecker) Close ¶
func (r *RadosChecker) Close() error
func (*RadosChecker) HostIsConnected ¶
func (r *RadosChecker) HostIsConnected(host string, timeout time.Duration) bool
func (*RadosChecker) Name ¶
func (r *RadosChecker) Name() string
type StorageChecker ¶
func NewRadosChecker ¶
func NewRadosChecker(monHost, user, key, poolName, cluster string, timeout time.Duration) (StorageChecker, error)
func NewS3Checker ¶
func NewS3Checker(endpoint, accessKey, secretKey, bucket string, timeout time.Duration) (StorageChecker, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.