Documentation ¶
Index ¶
- Constants
- Variables
- func Elapsed(start time.Time) string
- func GetConfigString(configInfos *CALLLOGCONFIG) string
- func GetLevel() string
- func GetLogger(loggerName string) *logrus.Logger
- func ReplaceEnvPath(str string) string
- func SetLevel(strLevel string)
- func Start() time.Time
- func String(logInfo interface{}) string
- type CALLLOGCONFIG
- type CALLLogger
- type CLOUDLOGSCHEMA
- type CLOUD_OS
- type RES_TYPE
Constants ¶
View Source
const ( //=========== CloudOS (ref: cb-spider/cloud-driver-libs/cloudos.yaml) AWS CLOUD_OS = "AWS" AZURE CLOUD_OS = "AZURE" GCP CLOUD_OS = "GCP" ALIBABA CLOUD_OS = "ALIBABA" TENCENT CLOUD_OS = "TENCENT" IBM CLOUD_OS = "IBM" OPENSTACK CLOUD_OS = "OPENSTACK" CLOUDIT CLOUD_OS = "CLOUDIT" NCP CLOUD_OS = "NCP" NCPVPC CLOUD_OS = "NCPVPC" KTCLOUD CLOUD_OS = "KTCLOUD" NHNCLOUD CLOUD_OS = "NHNCLOUD" DOCKER CLOUD_OS = "DOCKER" MOCK CLOUD_OS = "MOCK" CLOUDTWIN CLOUD_OS = "CLOUDTWIN" //=========== ResourceType NLB RES_TYPE = "NETWORKLOADBALANCER" VMIMAGE RES_TYPE = "VMIMAGE" VMSPEC RES_TYPE = "VMSPEC" VPCSUBNET RES_TYPE = "VPC/SUBNET" SECURITYGROUP RES_TYPE = "SECURITYGROUP" VMKEYPAIR RES_TYPE = "VMKEYPAIR" VM RES_TYPE = "VM" )
Variables ¶
View Source
var (
HostIPorName string
)
global var.
Functions ¶
func GetConfigString ¶
func GetConfigString(configInfos *CALLLOGCONFIG) string
Types ¶
type CALLLOGCONFIG ¶
type CALLLOGCONFIG struct { CALLLOG struct { LOOPCHECK bool LOGLEVEL string LOGFILE bool } LOGFILEINFO struct { FILENAME string MAXSIZE int MAXBACKUPS int MAXAGE int } }
func GetConfigInfos ¶
func GetConfigInfos() CALLLOGCONFIG
type CALLLogger ¶
type CALLLogger struct {
// contains filtered or unexported fields
}
type CLOUDLOGSCHEMA ¶
type CLOUDLOGSCHEMA struct { CloudOS CLOUD_OS // ex) AWS | AZURE | ALIBABA | GCP | OPENSTACK | CLOUDTWIN | CLOUDIT | DOCKER | NCP | MOCK | IBM RegionZone string // ex) us-east1/us-east1-c ResourceType RES_TYPE // ex) VMIMAGE | VMSPEC | VPCSUBNET | SECURITYGROUP | VMKEYPAIR | VM ResourceName string // ex) vpc-01 CloudOSAPI string // ex) CreateKeyPair() ElapsedTime string // ex) 2.0201 (sec) ErrorMSG string // if success, "" }
=========================
Click to show internal directories.
Click to hide internal directories.