Files
crawlab/core/constants/dependency.go
Marvin Zhang c3f4c4ae05 feat: enhance gRPC client with structured logging and dependency actions
- Added DependencyActionSync and DependencyActionSetup constants to improve dependency management.
- Refactored GrpcClient to utilize a logger interface for consistent logging across connection states and errors.
- Updated Start, Stop, and connection methods to replace direct log calls with logger methods, enhancing log context and readability.
- Simplified test cases by removing error checks on gRPC client start, ensuring cleaner test setup.
2024-12-23 17:17:21 +08:00

28 lines
662 B
Go

package constants
const (
DependencyTypePython = "python"
DependencyTypeNode = "node"
DependencyTypeGo = "go"
DependencyTypeJava = "java"
DependencyTypeBrowser = "browser"
)
const (
DependencyStatusInstalling = "installing"
DependencyStatusInstalled = "installed"
DependencyStatusUninstalling = "uninstalling"
DependencyStatusUninstalled = "uninstalled"
DependencyStatusError = "error"
DependencyStatusAbnormal = "abnormal"
)
const (
DependencyFileTypeRequirementsTxt = "requirements.txt"
DependencyFileTypePackageJson = "package.json"
)
const (
DependencyActionSync = "sync"
DependencyActionSetup = "setup"
)