gateways

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2017 License: MPL-2.0 Imports: 16 Imported by: 0

README

HTTP Gateway

The HTTP gateway provides access to the fidias cluster via HTTP API's

Endpoints

The following are a list of available endpoints:

/v1/kv/{ key }

This endpoint allows to perform key-value pair operations.

Method Body Description
GET Get a key
POST/PUT Any data as the value Set a key
DELETE Delete a key
/v1/lookup/{ key }

This endpoint performs a lookup on the key returning the max or specified number of successors.

Method Parameters Description
GET n Number of successors Lookup key
/v1/locate/{ key }

This endpoint finds replica locations for a given key.

Method Parameters Description
GET r Number of replicas Locate key replicas
/v1/hexalog/{ key }

This endpoint allows operations directly against the log. Its use is intended for admin purposes only.

/v1/blox

This endpoint allows operations on the content-addressable storage

/v1/fs/{ path }

This endpoint allows operations on the file-system

/v1/status

This endpoint returns the status of the node.

Method Description
GET Get the status of the node

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

type HTTPServer struct {
	// contains filtered or unexported fields
}

HTTPServer serves all http requests that guac supports

func NewHTTPServer

func NewHTTPServer(apiPrefix string, conf *fidias.Config, ring *hexaring.Ring, keyvs *fidias.Keyvs, logstore *hexalog.LogStore, dev filesystem.BlockDevice, fids *fidias.Fidias) *HTTPServer

NewHTTPServer instantiates a new Guac HTTP API server

func (*HTTPServer) ServeHTTP

func (server *HTTPServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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