A client library for EventStoreDB 20.x and above
Getting started
- Create a cluster in EventStore Cloud (or deploy your own)
- Create an appropriate connection string
- Create an instance of EventStoreClient with given connection string
A simple usage example of reading from a self-hosted single-node:
import 'package:eventstore_client_dart/eventstore_client_dart.dart';
void main() async {
// Create a client instance
final client = EventStoreClient(
EventStoreClientSettings.parse(
'esdb://127.0.0.1:2113',
),
);
// Fetch all events in EventStore
final result = await client.readFromAll(
forward: true,
resolveLinks: true,
position: LogPosition.start,
);
// Only print if read was successful
if (result.isOK) {
await for (var event in result.stream) {
print(event);
}
}
}
Features and bugs
This package supports the following EventStoreDB client APIs
xStreams gRPC APIProjections Management gRPC APIPersistent Subscriptions Management gRPC APIxGossip gRPC API (open source version of EventstoreDB)Cluster Management gRPC API (commercial version of EventstoreDB)Operations gRPC APIMonitoring gRPC APIUser Management gRPC API
Please file feature requests and bugs at the issue tracker.
Libraries
- eventstore_client_dart
- A client library for EventStoreDB 20.x and above