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/conf/cloudos.yaml) AWS CLOUD_OS = "AWS" GCP CLOUD_OS = "GCP" AZURE CLOUD_OS = "AZURE" OPENSTACK CLOUD_OS = "OPENSTACK" CLOUDIT CLOUD_OS = "CLOUDIT" ALIBABA CLOUD_OS = "ALIBABA" DOCKER CLOUD_OS = "DOCKER" CLOUDTWIN CLOUD_OS = "CLOUDTWIN" NCP CLOUD_OS = "NCP" MOCK CLOUD_OS = "MOCK" //=========== ResourceType 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 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.