{"id":19149821,"url":"https://github.com/harness/dlite","last_synced_at":"2026-02-09T15:17:57.999Z","repository":{"id":43638919,"uuid":"506661844","full_name":"harness/dlite","owner":"harness","description":"Golang client to interact and accept tasks from the Harness manager","archived":false,"fork":false,"pushed_at":"2026-02-03T22:38:15.000Z","size":76,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":54,"default_branch":"main","last_synced_at":"2026-02-04T11:32:37.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harness.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-06-23T13:56:32.000Z","updated_at":"2024-12-09T20:58:09.000Z","dependencies_parsed_at":"2024-02-08T09:40:56.964Z","dependency_job_id":"875d08ab-85d8-4ebb-b6c9-5e3bf26890fa","html_url":"https://github.com/harness/dlite","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/harness/dlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fdlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fdlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fdlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fdlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harness","download_url":"https://codeload.github.com/harness/dlite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harness%2Fdlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29270334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T13:47:44.167Z","status":"ssl_error","status_checked_at":"2026-02-09T13:47:43.721Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T08:09:45.959Z","updated_at":"2026-02-09T15:17:57.978Z","avatar_url":"https://github.com/harness.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nA golang client which can interact and accept tasks from the Harness manager (or any task management system which implements the same interface)\n\n# Usage\n\nA way to use this client would be:\n\nDefine task implementations:\n```\nvar RouteMap = map[string]task.Handler{\n\t\"CI_DOCKER_INITIALIZE_TASK\": \u0026setup.DockerInitializeTask{},\n\t\"CI_DOCKER_EXECUTE_TASK\":    \u0026step.DockerExecuteTask{},\n\t\"CI_DOCKER_CLEANUP_TASK\":    \u0026cleanup.DockerCleanupTask{},\n}\n```\n\nDefine a task. A task needs to implement the HTTP handler interface:\n```\n// A task must implement the handler interface. Example:\ntype DockerInitializeTask struct {\n}\n\n// DockerInitializeTask initializes a pipeline execution\ntype DockerInitTaskRequest struct {}\ntype DockerInitTaskResponse struct {}\nfunc (t *DockerInitializeTask) ServeHTTP(w http.ResponseWriter, req *http.Request) {\n  task := \u0026client.Task{}\n  err := json.NewDecoder(r.Body).Decode(task)\n  if err != nil {\n    httphelper.WriteBadRequest(w, err)\n    return\n  }\n  // Unmarshal the task data\n  taskBytes, err := task.Data.MarshalJSON()\n  if err != nil {\n     httphelper.WriteBadRequest(w, err)\n     return\n  }\n  d := \u0026DockerInitTaskRequest{}\n  err = json.Unmarshal(taskBytes, d)\n  if err != nil {\n    httphelper.WriteBadRequest(w, err)\n    return\n  }\n  // Write the response to writer\n  obj := DockerExecutionResponse{}\n  httphelper.WriteJSON(w, obj, 200)\n}\n```\n\nRegister the routes:\n```\n// These routes can be registered with the router\nrouter := router.NewRouter(router.RouteMap)\n```\n\nCreate a client and start polling for tasks:\n```\n// Create a delegate client\nclient := delegate.Client(...)\n\n// The poller needs a client that interacts with the task management system and a router to route the tasks\npoller := poller.New(...)\n\n// Register the poller\ninfo, err := poller.Register(...)\n\n// Start polling for tasks\nerr := poller.Poll(ctx, parallelExecutors, info.ID, ... ,interval)\n```\n\n# Future goals\n\nThe goal is for this client to become the defacto interface of interacting with both the Harness manager as well as the Drone server for accepting and executing tasks. It should be pluggable into any of the existing drone runners and be used for both Harness CIE and Drone.\n\n# Release Procedure\n\n## Run the changelog generator\n\n```BASH\ndocker run -it --rm -v \"$(pwd)\":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u harness -p dlite -t \u003csecret github token\u003e\n```\n\nYou can generate a token by logging into your GitHub account and going to Settings -\u003e Personal access tokens.\n\nNext we tag the PR's with the fixes or enhancements labels. If the PR does not fufil the requirements, do not add a label.\n\nRun the changelog generator again with the future version according to semver.\n\n```BASH\ndocker run -it --rm -v \"$(pwd)\":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone-runners -p drone-runner-aws -t \u003csecret token\u003e --future-release v1.0.0\n```\n\nCreate your pull request for the release. Get it merged then tag the release.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharness%2Fdlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharness%2Fdlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharness%2Fdlite/lists"}