service

package
v0.0.0-...-168a2c3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service http API service struct

func NewService

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

NewService creates a new http API service

func (*Service) GetBlock

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

GetBlock returns a specific block based on index

func (*Service) GetConsensusEvents

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

GetConsensusEvents returns all the events that have reached consensus

func (*Service) GetEventBlock

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

GetEventBlock returns a specific event block by id

func (*Service) GetKnownEvents

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

GetKnownEvents returns all known events by ID

func (*Service) GetLastEventFrom

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

GetLastEventFrom returns the last event for a specific participant

func (*Service) GetLastRound

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

GetLastRound returns the last known round

func (*Service) GetParticipants

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

GetParticipants returns all the known participants

func (*Service) GetRoot

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

GetRoot returns the root for a given frame

func (*Service) GetRound

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

GetRound returns a round for the given index

func (*Service) GetRoundClothos

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

GetRoundClothos returns all clotho for a round

func (*Service) GetRoundEvents

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

GetRoundEvents returns all the events for a given round

func (*Service) GetStats

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

GetStats returns all the node processing stats

func (*Service) Serve

func (s *Service) Serve()

Serve serves the API

Jump to

Keyboard shortcuts

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