service

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Service ...

func NewService

func NewService(bindAddress string, n *node.Node, logger *logrus.Entry) *Service

NewService ...

func (*Service) GetBlock

func (s *Service) GetBlock(w http.ResponseWriter, r *http.Request)

GetBlock ...

func (*Service) GetGenesisPeers added in v0.5.0

func (s *Service) GetGenesisPeers(w http.ResponseWriter, r *http.Request)

GetGenesisPeers ...

func (*Service) GetGraph added in v0.4.1

func (s *Service) GetGraph(w http.ResponseWriter, r *http.Request)

GetGraph ...

func (*Service) GetPeers added in v0.4.1

func (s *Service) GetPeers(w http.ResponseWriter, r *http.Request)

GetPeers ...

func (*Service) GetStats

func (s *Service) GetStats(w http.ResponseWriter, r *http.Request)

GetStats ...

func (*Service) Serve

func (s *Service) Serve()

Serve calls ListenAndServe. This is a blocking call. It is not necessary to call Serve when Babble is used in-memory and another server has already been started with the DefaultServerMux and the same address:port combination. Indeed, Babble API handlers have already been registered when the service was instantiated.

Jump to

Keyboard shortcuts

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