Documentation ¶
Index ¶
- Variables
- type AvailabilityResponse
- type Config
- type Handler
- type NamespacedDataResponse
- type NamespacedSharesResponse
- type Server
- func (s *Server) ListenAddr() string
- func (s *Server) RegisterHandlerFunc(pattern string, handlerFunc http.HandlerFunc, method string)
- func (s *Server) RegisterMiddleware(middlewareFuncs ...mux.MiddlewareFunc)
- func (s *Server) Router() *mux.Router
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) Start(context.Context) error
- func (s *Server) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidAddressFormat = errors.New("address must be a valid account or validator address") ErrMissingAddress = errors.New("address not specified") )
Functions ¶
This section is empty.
Types ¶
type AvailabilityResponse ¶
type AvailabilityResponse struct {
Available bool `json:"available"`
}
AvailabilityResponse represents the response to a `/data_available` request.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) RegisterEndpoints ¶
func (*Handler) RegisterMiddleware ¶
type NamespacedDataResponse ¶
NamespacedDataResponse represents the response to a DataByNamespace request.
type NamespacedSharesResponse ¶
type NamespacedSharesResponse struct {}
NamespacedSharesResponse represents the response to a SharesByNamespace request.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a gateway server on the Node.
func (*Server) ListenAddr ¶
ListenAddr returns the listen address of the server.
func (*Server) RegisterHandlerFunc ¶
func (s *Server) RegisterHandlerFunc(pattern string, handlerFunc http.HandlerFunc, method string)
RegisterHandlerFunc registers the given http.HandlerFunc on the Server's multiplexer on the given pattern.
func (*Server) RegisterMiddleware ¶
func (s *Server) RegisterMiddleware(middlewareFuncs ...mux.MiddlewareFunc)
RegisterMiddleware allows to register a custom middleware that will be called before http.Request will reach handler.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP serves inbound requests on the Server.
Click to show internal directories.
Click to hide internal directories.