Documentation ¶
Overview ¶
Package monitorserver contains an implementation of a Monitor server which can be queried for monitoring results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNothingProcessed occurs when the monitor did not process any mutations / // smrs yet. ErrNothingProcessed = errors.New("did not process any mutations yet") )
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds internal state for the monitor server. It serves monitoring responses via a grpc and HTTP API.
func New ¶
func New(storage monitorstorage.Interface) *Server
New creates a new instance of the monitor server.
func (*Server) GetState ¶
GetState returns the latest valid signed map root the monitor observed. Additionally, the response contains additional data necessary to reproduce errors on failure.
Returns the signed map root for the latest epoch the monitor observed. If the monitor could not reconstruct the map root given the set of mutations from the previous to the current epoch it won't sign the map root and additional data will be provided to reproduce the failure.
func (*Server) GetStateByRevision ¶
GetStateByRevision works similar to GetSignedMapRoot but returns the monitor's result for a specific map revision.
Returns the signed map root for the specified epoch the monitor observed. If the monitor could not reconstruct the map root given the set of mutations from the previous to the current epoch it won't sign the map root and additional data will be provided to reproduce the failure.