{"id":19225390,"url":"https://github.com/wasmcloud/lattice-observer","last_synced_at":"2025-04-21T00:32:11.447Z","repository":{"id":44530125,"uuid":"419454094","full_name":"wasmCloud/lattice-observer","owner":"wasmCloud","description":"A reusable Elixir library for monitoring a lattice and deriving observed state","archived":false,"fork":false,"pushed_at":"2024-01-25T16:32:26.000Z","size":91,"stargazers_count":3,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T07:21:22.787Z","etag":null,"topics":["elixir","lattice","nats","otp","webassembly"],"latest_commit_sha":null,"homepage":"https://wasmcloud.com","language":"Elixir","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/wasmCloud.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-10-20T18:54:56.000Z","updated_at":"2024-02-13T15:19:57.000Z","dependencies_parsed_at":"2023-02-14T23:16:12.964Z","dependency_job_id":"354abdb1-0cdb-4eb7-9294-3b57ca44760c","html_url":"https://github.com/wasmCloud/lattice-observer","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/wasmCloud%2Flattice-observer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmCloud%2Flattice-observer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmCloud%2Flattice-observer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmCloud%2Flattice-observer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasmCloud","download_url":"https://codeload.github.com/wasmCloud/lattice-observer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249980354,"owners_count":21355413,"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":["elixir","lattice","nats","otp","webassembly"],"created_at":"2024-11-09T15:14:46.668Z","updated_at":"2025-04-21T00:32:11.202Z","avatar_url":"https://github.com/wasmCloud.png","language":"Elixir","readme":"# Lattice Observer\nA reusable Elixir library for monitoring a lattice and deriving observed state.\n\n## Usage\nThe lattice observer is a `GenServer` supervisor that operates a process tree responsible for reacting to events from a lattice and computing derived state from those events. \n\nFirst, you'll want to create a `Gnat.ConnectionSupervisor` with a given name, for example:\n\n```elixir\n Supervisor.child_spec(\n        {Gnat.ConnectionSupervisor, nats_connection_options},\n        id: :lattice_connection_supervisor\n      ),\n```\n\nWith a running Gnat/NATS connection supervisor, you can then start the NATS lattice observer:\n\n```elixir\n{:ok, lattice} = NatsObserver.start_link(\n    %{\n        supervised_connection: :lattice_connection_supervisor,\n        module: MyApp.LatticeWatcher\n        lattice_prefix: \"default\"\n    })\n```\n\nThe `module` argument is the name of a module that must implement the `LatticeObserver.Observer` behavior. This module's `state_changed(state)` function will be invoked when state changes, etc.\n\nFor more information, see the hex documentation.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmcloud%2Flattice-observer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasmcloud%2Flattice-observer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmcloud%2Flattice-observer/lists"}