mongoshake

package module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2023 License: MIT Imports: 3 Imported by: 0

README

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)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string
}

func New

func New(url string) (*Client, error)

func NewClient

func NewClient(url string) *Client

func (*Client) GetConfig

func (c *Client) GetConfig() (*api.Conf, error)

func (*Client) GetExecutor

func (c *Client) GetExecutor() (*[]api.Executor, error)

func (*Client) GetQueue

func (c *Client) GetQueue() (*api.Queue, error)

func (*Client) GetRepl

func (c *Client) GetRepl() (*api.Repl, error)

func (*Client) GetSentinel

func (c *Client) GetSentinel() (*api.Sentinel, error)

func (*Client) GetWorker

func (c *Client) GetWorker() (*[]api.Worker, error)

func (*Client) VerifyURL

func (c *Client) VerifyURL(url string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL