api

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

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 handles the REST API requests in each node and redirects it to the local Node, where is the logic's core.

func NewServer

func NewServer(port int) *HttpServer

NewServer creates a new API HttpServer that receives the requests for the local node.

func (*HttpServer) Start

func (server *HttpServer) Start(node LocalNode) error

Start initializes the endpoints and starts the http web server.

func (*HttpServer) Stop

func (server *HttpServer) Stop()

Stop the http web server

type LocalNode

LocalNode exposes all the necessary functionality, of the local node, for the REST API web server.

type Server

type Server interface {
	Start(node LocalNode) error
	Stop()
}

Directories

Path Synopsis
Client package provides a client that allows to interact with the a CARAVELA's daemon sending the requests to it.
Client package provides a client that allows to interact with the a CARAVELA's daemon sending the requests to it.
Types package includes all the structures shared between the caravela's server/daemon and its clients.
Types package includes all the structures shared between the caravela's server/daemon and its clients.

Jump to

Keyboard shortcuts

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