MCPcopy
hub / github.com/dunglas/mercure

github.com/dunglas/mercure @v0.24.2 sqlite

repository ↗ · DeepWiki ↗ · release v0.24.2 ↗
509 symbols 2,593 edges 71 files 153 documented · 30%
README

Mercure: Real-time Made Easy

Protocol and Reference Implementation

Mercure is a protocol for pushing data updates to web browsers and other HTTP clients in a convenient, fast, reliable, and battery-efficient way. It is especially useful to publish async and real-time updates of resources served through web APIs, to reactive web and mobile apps.

Awesome Artifact HUB PkgGoDev CI Coverage Status Go Report Card

Subscriptions Schema

The protocol is maintained in this repository and is also available as an Internet-Draft.

A reference, production-grade, implementation of a Mercure hub (the server) is also available in this repository. It's free software (AGPL) written in Go. It is provided along with a library that can be used in any Go application to implement the Mercure protocol directly (without a hub) and an official Docker image.

In addition, a managed and high-scalability version of the Mercure.rocks hub is available on Mercure.rocks.

Contributing

See CONTRIBUTING.md.

License and Copyright

See license information.

Credits

Created by Kévin Dunglas. Graphic design by Laury Sorriaux. Sponsored by Les-Tilleuls.coop.

Extension points exported contracts — how you extend this code

TransportSubscribers (Interface)
TransportSubscribers provides a method to retrieve the list of active subscribers. [3 implementers]
transport.go
Option (FuncType)
Option instances allow to configure the library.
hub.go
Metrics (Interface)
(no doc) [2 implementers]
metrics.go
Transport (Interface)
nolint:gochecknoglobals
caddy/transport.go
TransportHealthChecker (Interface)
TransportHealthChecker may be implemented by transports that support health checking. Transports that do not implement t [1 …
transport.go
Transport (Interface)
Transport provides methods to dispatch and persist updates.
transport.go
TransportTopicSelectorStore (Interface)
TransportTopicSelectorStore provides a method to pass the TopicSelectorStore to the transport.
transport.go

Core symbols most depended-on inside this repo

Add
called by 152
subscriberlist.go
Close
called by 93
transport.go
Cleanup
called by 54
caddy/bolt.go
Error
called by 52
transport.go
String
called by 49
event.go
NewLocalSubscriber
called by 44
localsubscriber.go
Dispatch
called by 41
transport.go
Enabled
called by 38
logging.go

Shape

Function 295
Method 153
Struct 50
Interface 6
FuncType 2
Route 2
TypeAlias 1

Languages

Go98%
TypeScript1%
Python1%

Modules by API surface

subscribe_test.go52 symbols
authorization_test.go36 symbols
hub.go28 symbols
hub_test.go22 symbols
publish_test.go21 symbols
caddy/mercure.go17 symbols
transport.go16 symbols
subscribe.go16 symbols
server_deprecated_test.go15 symbols
metrics.go13 symbols
bolt_test.go13 symbols
bolt.go12 symbols

Dependencies from manifests, versioned

cel.dev/exprv0.25.2 · 1×
cloud.google.com/go/authv0.20.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
dario.cat/mergov1.0.2 · 1×
filippo.io/bigmodv0.1.0 · 1×
filippo.io/edwards25519v1.2.0 · 1×
github.com/AndreasBriese/bbloomv0.0.0-2019082515265 · 1×
github.com/BurntSushi/tomlv1.6.0 · 1×
github.com/DeRuina/timberjackv1.4.5 · 1×
github.com/KimMachineGun/automemlimitv0.7.5 · 1×
github.com/Masterminds/goutilsv1.1.1 · 1×

For agents

$ claude mcp add mercure \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact