{"id":28520008,"url":"https://github.com/source-c/go-ignit-thin","last_synced_at":"2025-06-25T06:05:13.303Z","repository":{"id":297091386,"uuid":"993904829","full_name":"source-c/go-ignit-thin","owner":"source-c","description":"Apache ignite (v2) thin client in Golang","archived":false,"fork":false,"pushed_at":"2025-06-03T20:38:25.000Z","size":87,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-19T01:48:51.999Z","etag":null,"topics":["apache-ignite","go","golang-library","ignite","thin-client","tiny-tools"],"latest_commit_sha":null,"homepage":"","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/source-c.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-05-31T19:18:10.000Z","updated_at":"2025-06-10T20:57:17.000Z","dependencies_parsed_at":"2025-06-04T04:41:18.179Z","dependency_job_id":null,"html_url":"https://github.com/source-c/go-ignit-thin","commit_stats":null,"previous_names":["source-c/go-ignit-thin"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/source-c/go-ignit-thin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fgo-ignit-thin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fgo-ignit-thin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fgo-ignit-thin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fgo-ignit-thin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/source-c","download_url":"https://codeload.github.com/source-c/go-ignit-thin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-c%2Fgo-ignit-thin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260669427,"owners_count":23044291,"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":["apache-ignite","go","golang-library","ignite","thin-client","tiny-tools"],"created_at":"2025-06-09T06:38:01.502Z","updated_at":"2025-06-25T06:05:13.296Z","avatar_url":"https://github.com/source-c.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ignite Go Client\n\nA Go thin client for [Apache Ignite v2](https://ignite.apache.org/).\nThis is experimental software mostly taken and refurbished from different sources and python binary helpers for research needs.\nThe library is distributed \"as-is\" without any warranty of any kind. How to use it, if use it at all, is solely on your own discretion.\n\n## Requirements\n\n- Go 1.22 or higher\n\n## Installation\n\n```bash\ngo get github.com/source-c/go-ignit-thin\n```\n\n## Usage\n\n### Basic Client Setup\n\nThe Apache Ignite Go driver starts with creating a `Client` using the `Start` function:\n\n```go\nctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)\ndefer cancel()\n\nclient, err := ignite.Start(ctx, ignite.WithAddresses(\"127.0.0.1:10800\", \"127.0.0.1:10801\"))\nif err != nil {\n    return err\n}\ndefer func() {\n    _ = client.Close(context.Background())\n}()\n```\n\nThis creates a new Ignite client connected to the Ignite cluster on localhost. You can pass multiple `ClientConfigurationOption` parameters to the `Start` method to specify various client options.\n\n### Cache Management\n\nCaches can be created or obtained using these methods:\n\n- `Client.GetOrCreateCache` - Gets or creates a cache by name\n- `Client.CreateCache` - Creates a cache by name\n- `Client.GetOrCreateCacheWithConfiguration` - Gets or creates a cache using `CacheConfiguration`\n- `Client.CreateCacheWithConfiguration` - Creates a cache using `CacheConfiguration`\n\nYou can obtain a list of existing caches using `Client.CacheNames`. To destroy a cache, use `Client.DestroyCache`.\n\n### Cache Operations\n\nHere's a basic usage example of the `Cache` interface:\n\n```go\nctx := context.Background()\ncache, err := client.GetOrCreateCacheWithConfiguration(ctx, ignite.CreateCacheConfiguration(\"test\",\n    ignite.WithCacheAtomicityMode(ignite.AtomicAtomicityMode),\n    ignite.WithCacheMode(ignite.ReplicatedCacheMode),\n    ignite.WithReadFromBackup(true),\n))\nif err != nil {\n    fmt.Printf(\"Failed to create cache: %s\\n\", err)\n    return\n}\n\nerr = cache.Put(ctx, \"test\", \"test\")\nif err != nil {\n    fmt.Printf(\"Failed to put value: %s\\n\", err)\n    return\n}\n\ncontains, err := cache.ContainsKey(ctx, \"test\")\nif err != nil {\n    fmt.Printf(\"Failed to invoke contains key operation: %s\\n\", err)\n    return\n}\nfmt.Printf(\"Contains key %s? %t\\n\", \"test\", contains)\n// Output: Contains key test? true\n```\n\nFor more operations, refer to the `Cache` documentation. Currently, the following types are supported:\n- Numerical types\n- String\n- UUID\n- Byte slices\n\nSupport for other types and BinaryObject will be added in future releases.\n\n### TTL (ExpiryPolicy) Support\n\nYou can set an ExpiryPolicy for entries by creating a special decorator using `Cache.WithExpiryPolicy`:\n\n```go\ncache, err := client.GetOrCreateCache(ctx, \"cache_name\")\nif err != nil {\n    fmt.Printf(\"Failed to create cache: %s\\n\", err)\n    return\n}\n\ncache = cache.WithExpiryPolicy(1*time.Second, DurationZero, DurationZero)\nerr = cache.Put(ctx, \"test\", \"test\")\nif err != nil {\n    fmt.Printf(\"Failed to put value: %s\\n\", err)\n    return\n}\n\n\u003c-time.After(1200 * time.Millisecond)\ncontains, err := cache.ContainsKey(ctx, \"test\")\nif err != nil {\n    fmt.Printf(\"Failed to invoke contains key operation: %s\\n\", err)\n    return\n}\nfmt.Printf(\"Contains key %s? %t\\n\", \"test\", contains)\n// Output: Contains key test? false\n```\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-c%2Fgo-ignit-thin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsource-c%2Fgo-ignit-thin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-c%2Fgo-ignit-thin/lists"}