{"id":25000559,"url":"https://github.com/gluster/gogfapi","last_synced_at":"2025-04-12T08:52:30.560Z","repository":{"id":12003287,"uuid":"14582470","full_name":"gluster/gogfapi","owner":"gluster","description":"A Go language wrapper around gfapi.","archived":false,"fork":false,"pushed_at":"2023-01-21T12:36:46.000Z","size":81,"stargazers_count":50,"open_issues_count":17,"forks_count":38,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-12T08:52:26.003Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gluster.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":"2013-11-21T08:56:21.000Z","updated_at":"2025-02-22T14:07:16.000Z","dependencies_parsed_at":"2023-02-12T09:46:09.014Z","dependency_job_id":null,"html_url":"https://github.com/gluster/gogfapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgogfapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgogfapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgogfapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgogfapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gluster","download_url":"https://codeload.github.com/gluster/gogfapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543883,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-02-04T19:35:45.769Z","updated_at":"2025-04-12T08:52:30.538Z","avatar_url":"https://github.com/gluster.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoGFAPI\n[![gogfapi documentation on GoDoc.org](https://godoc.org/github.com/gluster/gogfapi/gfapi?status.png)](http://godoc.org/github.com/gluster/gogfapi/gfapi)\n\nA GoGFAPI is Go wrapper around libgfapi, a userspace C-library to access GlusterFS volumes.\nGoGAPI provides a Go standard library (`os`) like API to access files on GlusterFS volumes.\nMore information on the API is available on [godoc.org/github.com/gluster/gofapi/gfapi](https://godoc.org/github.com/gluster/gogfapi/gfapi).\n\n\u003e Note: GoGFAPI uses [cgo](https://golang.org/cmd/cgo/) to bind with libgfapi.\n\n\u003e Important: Commit 83a4c9f12fec7d6e1112b5ebbd614a679940ad45 made changes to the `volume.Init()` function.\n\u003e The order of the function parameters was changed to support multiple volfile servers.\n\n## Using GoGFAPI\n\nFirst ensure that libgfapi is installed on your system. For Fedora and CentOS (and other EL systems) install the `glusterfs-api` package.\n\nGet GoGFAPI by doing a `go get`.\n```\ngo get -u github.com/gluster/gogfapi/gfapi\n```\n\nImport `github.com/gluster/gogfapi/gfapi` into your program to use it.\n\nA simple example,\n```go\npackage main\n\nimport \"github.com/gluster/gogfapi/gfapi\"\n\nfunc main() {\n\tvol := \u0026gfapi.Volume{}\n\tif err := vol.Init(\"testvol\", \"localhost\"); err != nil {\n\t\t// handle error\n\t}\n\n\tif err := vol.Mount(); err != nil {\n\t\t// handle error\n\t}\n\tdefer vol.Unmount()\n\n\tf, err := vol.Create(\"testfile\")\n\tif err != nil {\n\t\t// handle error\n\t}\n\tdefer f.Close()\n\n\tif _, err := f.Write([]byte(\"hello\")); err != nil {\n\t\t// handle error\n\t}\n\n\treturn\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluster%2Fgogfapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgluster%2Fgogfapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluster%2Fgogfapi/lists"}