calllog

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

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"
	NHNCLOUD   CLOUD_OS = "NHNCLOUD"
	KTCLOUD    CLOUD_OS = "KTCLOUD"
	KTCLOUDVPC CLOUD_OS = "KTCLOUDVPC"
	DOCKER     CLOUD_OS = "DOCKER"
	MOCK       CLOUD_OS = "MOCK"
	CLOUDTWIN  CLOUD_OS = "CLOUDTWIN"

	//=========== ResourceType
	REGIONZONE    RES_TYPE = "REGIONZONE"
	PRICEINFO     RES_TYPE = "PRICEINFO"
	VMIMAGE       RES_TYPE = "VMIMAGE"
	VMSPEC        RES_TYPE = "VMSPEC"
	VPCSUBNET     RES_TYPE = "VPC/SUBNET"
	SECURITYGROUP RES_TYPE = "SECURITYGROUP"
	VMKEYPAIR     RES_TYPE = "VMKEYPAIR"
	DISK          RES_TYPE = "DISK"
	VM            RES_TYPE = "VM"
	MYIMAGE       RES_TYPE = "MYIMAGE"
	NLB           RES_TYPE = "NETWORKLOADBALANCER"
	TAG           RES_TYPE = "TAG"

	//=========== PMKS: Provider-Managed K8S
	CLUSTER RES_TYPE = "CLUSTER"
)

Variables

View Source
var (
	HostIPorName string
)

global var.

Functions

func Elapsed

func Elapsed(start time.Time) string

func GetConfigString

func GetConfigString(configInfos *CALLLOGCONFIG) string

func GetLevel

func GetLevel() string

func GetLogger

func GetLogger(loggerName string) *logrus.Logger

func ReplaceEnvPath

func ReplaceEnvPath(str string) string

$ABC/def ==> /abc/def

func SetLevel

func SetLevel(strLevel string)

func Start

func Start() time.Time

func String

func String(logInfo interface{}) 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, ""
}

=========================

type CLOUD_OS

type CLOUD_OS string

type RES_TYPE

type RES_TYPE string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL