core

package
v0.0.0-...-41077f7 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const Error = "error"
View Source
const Fail = "fail"
View Source
const Ready = "ready"
View Source
const Running = "running"
View Source
const Success = "success"

Variables

View Source
var RunJobs = sync.Map{}
View Source
var Services = sync.Map{}
View Source
var WhenStartLoadAllDeploymentLock sync.Mutex

Functions

func DeleteJob

func DeleteJob(planID uint64)

func DeleteService

func DeleteService(svcName string)

func Exists

func Exists(path string) bool

func GenPlanDumpExecDir

func GenPlanDumpExecDir(planID uint64) string

func GenProjectClassDir

func GenProjectClassDir() string

func GenSvcClassDir

func GenSvcClassDir(svcName string) string

func GenSvcDumpExecDir

func GenSvcDumpExecDir(planID uint64, svcName string) string

func GenSvcJarDir

func GenSvcJarDir(svcName string) string

func GenSvcJarImageTempDir

func GenSvcJarImageTempDir(svcName string) (string, error)

func SetJob

func SetJob(planID uint64, job *DetectionJob)

func SetService

func SetService(svcName string, svc *Service)

func WatchJacocoPod

func WatchJacocoPod(ctx context.Context)

func WatchJob

func WatchJob(ctx context.Context)

Types

type CallbackEndRequest

type CallbackEndRequest struct {
	ID        uint64
	Status    string
	Msg       string
	ReportXml string `json:"reportXmlUUID"`
}

type CodeCoverageExecRecordDetail

type CodeCoverageExecRecordDetail struct {
	PlanID       uint64                 `json:"planID"`
	ProjectID    uint64                 `json:"projectID"`
	Status       CodeCoverageExecStatus `json:"status"`
	MavenSetting string                 `json:"mavenSetting"`
	Includes     string                 `json:"includes"`
	Excludes     string                 `json:"excludes"`
}

type CodeCoverageExecRecordDetailResp

type CodeCoverageExecRecordDetailResp struct {
	Header
	Data *CodeCoverageExecRecordDetail `json:"data"`
}

type CodeCoverageExecStatus

type CodeCoverageExecStatus string
const (
	RunningStatus CodeCoverageExecStatus = "running"
	ReadyStatus   CodeCoverageExecStatus = "ready"
	EndingStatus  CodeCoverageExecStatus = "ending"
	CancelStatus  CodeCoverageExecStatus = "cancel"
	SuccessStatus CodeCoverageExecStatus = "success"
	FailStatus    CodeCoverageExecStatus = "fail"
)

type DetectionJob

type DetectionJob struct {
	PlanID        uint64
	Status        CodeCoverageExecStatus
	JobStatus     string
	MavenSettings string
	Includes      string
	Excludes      string

	ErrorMsg string

	DumpLock sync.Mutex
	// contains filtered or unexported fields
}

func GetJob

func GetJob(planID uint64) (*DetectionJob, bool)

type ErrorResponse

type ErrorResponse struct {
	Code string      `json:"code"`
	Msg  string      `json:"msg"`
	Ctx  interface{} `json:"ctx"`
}

type File

type File struct {
	ID          uint64     `json:"id"`
	UUID        string     `json:"uuid"`
	DisplayName string     `json:"name"`
	ByteSize    int64      `json:"size"`
	DownloadURL string     `json:"url"`
	Type        string     `json:"type"`
	From        string     `json:"from"`
	Creator     string     `json:"creator"`
	CreatedAt   time.Time  `json:"createdAt"`
	UpdatedAt   time.Time  `json:"updatedAt"`
	ExpiredAt   *time.Time `json:"expiredAt,omitempty"`
}

type FileUploadResponse

type FileUploadResponse struct {
	Header
	Data *File `json:"data"`
}

FileUploadResponse 文件上传响应

type Header struct {
	Success bool          `json:"success" `
	Error   ErrorResponse `json:"err"`
}

type Pod

type Pod struct {
	Addr          string
	PodName       string
	ContainerName string
	ErrorMsg      string
	HasError      bool
}

type Service

type Service struct {
	Name               string
	Image              string
	JarAddrList        []string
	Pods               []Pod
	LoadJarPackageLock sync.Mutex
	ErrorMessage       string

	IsDelete bool
	// contains filtered or unexported fields
}

func GetService

func GetService(svcName string) (*Service, bool)

Jump to

Keyboard shortcuts

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