mongo_keepalive 1.0.0 copy "mongo_keepalive: ^1.0.0" to clipboard
mongo_keepalive: ^1.0.0 copied to clipboard

Keep MongoDB Atlas free-tier clusters alive by sending periodic ping commands

mongo_keepalive #

Keep MongoDB Atlas free-tier clusters alive by sending periodic ping commands.

Installation #

dart pub add mongo_keepalive

Usage #

import 'package:mongo_keepalive/keepalive.dart';

void main() async {
  final handle = await startKeepAlive(
    uri: 'mongodb+srv://user:pass@cluster.mongodb.net/db',
    interval: '12h', // optional, defaults to "12h"
  );

  // To stop later:
  // await handle.stop();
}

API #

startKeepAlive(uri, interval) #

Parameter Type Default Description
uri String MongoDB connection string (required)
interval String "12h" Ping interval ("12h", "30m", "60s")

Returns a Future<KeepAliveHandle>.

License #

MIT

0
likes
140
points
11
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Keep MongoDB Atlas free-tier clusters alive by sending periodic ping commands

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

mongo_dart

More

Packages that depend on mongo_keepalive