Documentation ¶
Index ¶
- func AppendFile(path string, data []byte) error
- func CreateDockerConnector(org, id string, args ...interface{}) *harness.Connector
- func CreateFolder(path string) error
- func CreateGithubConnector(org, id, username, token string) *harness.Connector
- func CreateGitlabConnector(org, id, username, token string) *harness.Connector
- func CreateSecret(org, project, identifier, desc, data string) *harness.Secret
- func CreateSecretOrg(org, identifier, data string) *harness.Secret
- func DeleteDirsExcept(rootPath, exceptFilePath string) error
- func GetJson(data any) ([]byte, error)
- func GetRepoDirFromRepoSlug(repoSlug string) string
- func IsErrConflict(err error) bool
- func JoinPaths(elem ...string) string
- func Unzip(src string, dest string) error
- func WriteFile(path string, prJson []byte) error
- func ZipFolder(source, destination string) error
- type DockerConnectorOptions
- type Result
- type Task
- type TaskPool
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶ added in v0.22.0
func CreateDockerConnector ¶
CreateDockerConnector helper function to create a docker connector
func CreateFolder ¶ added in v0.22.0
func CreateGithubConnector ¶
CreateGithubConnector helper function to create a github connector
func CreateGitlabConnector ¶
CreateGitlabConnector helper function to create a GitHub connector
func CreateSecret ¶
func CreateSecretOrg ¶
CreateSecretOrg helper function to create an org secret.
func DeleteDirsExcept ¶ added in v0.22.0
DeleteDirsExcept deletes all directories in the specified path except for the specified file's path.
func GetRepoDirFromRepoSlug ¶ added in v0.26.0
func IsErrConflict ¶
IsErrConflict helper function return true if the codeerror message indicate the resource already exists.
Types ¶
type DockerConnectorOptions ¶
type TaskPool ¶ added in v0.22.0
type TaskPool struct { MaxParallelism int TaskCh chan *Task ResultCh chan *Result Wg *sync.WaitGroup Cancel context.CancelFunc // contains filtered or unexported fields }
TaskPool represents a pool of workers that can execute tasks concurrently.
func NewTaskPool ¶ added in v0.22.0
NewTaskPool creates a new job pool.
func (*TaskPool) ForceShutdown ¶ added in v0.23.0
func (tp *TaskPool) ForceShutdown()
func (*TaskPool) MarkResultRead ¶ added in v0.22.0
func (tp *TaskPool) MarkResultRead()
func (*TaskPool) Shutdown ¶ added in v0.22.0
func (tp *TaskPool) Shutdown()
Shutdown gracefully shuts down the thread pool
Click to show internal directories.
Click to hide internal directories.