admin

package
v0.0.0-...-bc5e729 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2017 License: MPL-2.0 Imports: 10 Imported by: 0

README

admin

admin is a HTTP server provides the API for the info of alive caches and databases.

We assume that only need one cache master and database master in one oncekv system, so we use the Default object using the config.Config.

API list:

  1. GET /caches returns the list of the URL for the current alive cache servers.
  2. Websocket /ws/caches same reponse data like /caches.
  3. GET /dbs returns the list of the URL for the current alive database servers.
  4. Websocket /ws/dbs same reponse data like /dbs.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	*gin.Engine

	CacheMaster *cache.Master
	DBMaster    *db.Master
	// contains filtered or unexported fields
}

Admin for oncekv admin

var Default *Admin

Default act as a default Admin

func (*Admin) Start

func (a *Admin) Start()

Start starts the admin server

Jump to

Keyboard shortcuts

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