Skip to content

AmiasLi/mongoshake_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongoshake-go

A client to getting MongoShake information.

Usage

package main

import (
	"fmt"
	"github.com/AmiasLi/mongoshake_client"
)

func main() {

	// new client with url of mongoshake Incremental API
	// Progress API only support when full sync, not support incremental sync after restart mongoshake
	client, _ := mongoshake.New("http://192.168.124.65:9100")

	config, _ := client.GetConfig()
	fmt.Println(config)

	repl, _ := client.GetRepl()
	fmt.Println(repl)
}