{"id":19463853,"url":"https://github.com/kasworld/signalhandle","last_synced_at":"2026-06-19T07:31:22.273Z","repository":{"id":57523023,"uuid":"186389256","full_name":"kasworld/signalhandle","owner":"kasworld","description":"(linux) signal handler for server/service ","archived":false,"fork":false,"pushed_at":"2021-02-06T06:46:04.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T13:30:31.212Z","etag":null,"topics":["golang","server-library","service-maker","signal-handler"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kasworld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-13T09:33:09.000Z","updated_at":"2021-02-06T06:46:06.000Z","dependencies_parsed_at":"2022-08-28T06:00:13.709Z","dependency_job_id":null,"html_url":"https://github.com/kasworld/signalhandle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kasworld/signalhandle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasworld%2Fsignalhandle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasworld%2Fsignalhandle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasworld%2Fsignalhandle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasworld%2Fsignalhandle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kasworld","download_url":"https://codeload.github.com/kasworld/signalhandle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kasworld%2Fsignalhandle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34522034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","server-library","service-maker","signal-handler"],"created_at":"2024-11-10T18:12:28.347Z","updated_at":"2026-06-19T07:31:22.256Z","avatar_url":"https://github.com/kasworld.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# golang signal handler for server/service for linux   \n\n리눅스용 서버/서비스를 만드는데 사용하는 signal handler 입니다. \n\n# 기능 \n\npid lockfile을 사용해서 서비스의 제어를 가능하게 해줍니다. \n\n서비스 시작 : 중복 실행을 막으며 서비스 시작이 가능합니다. \n\n    -service=start \n\n서비스 종료 : ctrl-c 등으로 종료할때 서비스 클린업을 하고 종료 할 수 있습니다. \n\n    -service=stop\n\n\n로그 로테이트 : 서비스 실행중에 로그 파일의 교체가 가능합니다. \n\n    -service=logreopen\n\n\n서비스 재시작 : 실행중인 서비스를 종료하고 다시 시작 합니다. \n\n    -service=restart \n\n서비스 강제 재시작 : 전원 중단 등으로 비정상 종료된 경우 pid lockfile을 지우고 서비스를 강재로 시작 합니다. \n\n    -service=forcestart\n\n\n# 사용시 추가 되는 인자 \n\n    -service string\n    \tstart,stop,restart,forcestart,logreopen (default \"start\")\n\n# 사용자 프로그램에서 구현 해야 하는 interface\n\n서비스로 만드려는 프로그램 (struct) 에서 다음 인터페이스를 구현 합니다. \n\n    type ServiceI interface {\n        GetServiceLockFilename() string\n        ServiceInit() error\n        ServiceMain(ctx context.Context)\n        ServiceCleanup()\n        GetLogger() interface{} // LoggerI 를 구현 해야 합니다. \n    }\n\n    type LoggerI interface {\n        Reload() error\n        Fatal(format string, v ...interface{})\n        Error(format string, v ...interface{})\n        Debug(format string, v ...interface{})\n    }\n\n# 사용 예제 \n\nexample/example.go 참고 \n\n# 사용 프로젝트 \n\nhttps://github.com/kasworld/goonlinescaffolding\n\nhttps://github.com/kasworld/gowasm3dgame\n\nhttps://github.com/kasworld/gowasm2dgame\n\nhttps://github.com/kasworld/goguelike\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasworld%2Fsignalhandle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkasworld%2Fsignalhandle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkasworld%2Fsignalhandle/lists"}