Documentation
¶
Index ¶
- Constants
- Variables
- func ApprovalHandler(c echo.Context) error
- func DiagnosticBranchesHandler(c echo.Context) (err error)
- func DiagnosticMessagesHandler(c echo.Context) (err error)
- func DiagnosticMessagesOnlyFirstWeakReferencesHandler(c echo.Context) (err error)
- func DiagnosticMessagesRankHandler(c echo.Context) (err error)
- func DiagnosticUTXODAGHandler(c echo.Context) (err error)
- func MissingAvailableHandler(c echo.Context) error
- func MissingHandler(c echo.Context) error
- func OrphanageHandler(c echo.Context) error
- func PastconeHandler(c echo.Context) error
- func SendMessage(c echo.Context) error
- func TipsDiagnosticHandler(c echo.Context) error
- type ApprovalResponse
- type ByArrival
- type ByIssuance
- type BySolid
- type DiagnosticBranchInfo
- type DiagnosticMessagesInfo
- type DiagnosticUTXODAGInfo
- type MsgApproval
- type MsgInfo
- type MsgInfoOrphanage
- type OrphanageResponse
- type ParametersDefinition
Constants ¶
const ( // RouteDiagnosticMessages is the API route for message diagnostics. RouteDiagnosticMessages = routeDiagnostics + "/messages" // RouteDiagnosticsFirstWeakMessageReferences is the API route for first weak message diagnostics. RouteDiagnosticsFirstWeakMessageReferences = RouteDiagnosticMessages + "/firstweakreferences" // RouteDiagnosticsMessageRank is the API route for message diagnostics with a rank filter. RouteDiagnosticsMessageRank = RouteDiagnosticMessages + "/rank/:rank" // RouteDiagnosticsUtxoDag is the API route for Utxo Dag diagnostics. RouteDiagnosticsUtxoDag = routeDiagnostics + "/utxodag" // RouteDiagnosticsBranches is the API route for branches diagnostics. RouteDiagnosticsBranches = routeDiagnostics + "/branches" // RouteDiagnosticsTips is the API route for tips diagnostics. RouteDiagnosticsTips = routeDiagnostics + "/tips" )
const PluginName = "WebAPIToolsMessageEndpoint"
PluginName is the name of the web API tools messages endpoint plugin.
Variables ¶
var DiagnosticBranchesTableDescription = []string{
"ID",
"ConflictSet",
"IssuanceTime",
"SolidTime",
"LazyBooked",
"GradeOfFinality",
}
DiagnosticBranchesTableDescription holds the description of the diagnostic Branches.
var DiagnosticMessagesTableDescription = []string{
"ID",
"IssuerID",
"IssuerPublicKey",
"IssuanceTime",
"ArrivalTime",
"SolidTime",
"ScheduledTime",
"BookedTime",
"GradeOfFinality",
"GradeOfFinalityTime",
"StrongParents",
"WeakParents",
"DislikeParents",
"LikeParents",
"StrongApprovers",
"WeakApprovers",
"ShallowLikeApprovers",
"ShallowDislikeApprovers",
"BranchID",
"Scheduled",
"Booked",
"Invalid",
"Rank",
"IsPastMarker",
"PastMarkers",
"PMHI",
"PMLI",
"FutureMarkers",
"FMHI",
"FMLI",
"PayloadType",
"TransactionID",
}
DiagnosticMessagesTableDescription holds the description of the diagnostic messages.
var DiagnosticUTXODAGTableDescription = []string{
"ID",
"IssuanceTime",
"SolidTime",
"AccessManaPledgeID",
"ConsensusManaPledgeID",
"Inputs",
"Outputs",
"Attachments",
"BranchID",
"Conflicting",
"LazyBooked",
"GradeOfFinality",
"GradeOfFinalityTime",
}
DiagnosticUTXODAGTableDescription holds the description of the diagnostic UTXODAG.
var Parameters = &ParametersDefinition{}
Parameters contains the configuration parameters of the web API tools endpoint plugin.
var ( // Plugin is the plugin instance of the web API tools messages endpoint plugin. Plugin = node.NewPlugin(PluginName, deps, node.Enabled, configure) )
var TableDescription = []string{
"nodeID",
"MsgID",
"MsgIssuerID",
"MsgIssuanceTime",
"MsgArrivalTime",
"MsgSolidTime",
"ByIssuanceMsgID",
"ByIssuanceMsgIssuerID",
"ByIssuanceMsgIssuanceTime",
"ByIssuanceMsgArrivalTime",
"ByIssuanceMsgSolidTime",
"ByArrivalMsgID",
"ByArrivalMsgIssuerID",
"ByArrivalMsgIssuanceTime",
"ByArrivalMsgArrivalTime",
"ByArrivalMsgSolidTime",
"BySolidMsgID",
"BySolidMsgIssuerID",
"BySolidMsgIssuanceTime",
"BySolidMsgArrivalTime",
"BySolidMsgSolidTime",
}
TableDescription holds the description of the First Approval analysis table.
var TableDescriptionOrphanage = []string{
"MsgID",
"MsgIssuerID",
"MsgIssuanceTime",
"MsgArrivalTime",
"MsgSolidTime",
"MsgApprovedBy",
}
TableDescriptionOrphanage holds the description of the First Approval analysis table.
Functions ¶
func ApprovalHandler ¶
ApprovalHandler runs the approval analysis.
func DiagnosticBranchesHandler ¶
DiagnosticBranchesHandler runs the diagnostic over the Tangle.
func DiagnosticMessagesHandler ¶
DiagnosticMessagesHandler runs the diagnostic over the Tangle.
func DiagnosticMessagesOnlyFirstWeakReferencesHandler ¶
DiagnosticMessagesOnlyFirstWeakReferencesHandler runs the diagnostic over the Tangle.
func DiagnosticMessagesRankHandler ¶
DiagnosticMessagesRankHandler runs the diagnostic over the Tangle for messages with rank >= of the given rank parameter.
func DiagnosticUTXODAGHandler ¶
DiagnosticUTXODAGHandler runs the diagnostic over the Tangle.
func MissingAvailableHandler ¶
MissingAvailableHandler is the handler for requests that check if a Message is available at a nodes neighbors.
func MissingHandler ¶
MissingHandler process missing requests.
func OrphanageHandler ¶
OrphanageHandler runs the orphanage analysis.
func PastconeHandler ¶
PastconeHandler process a pastcone request.
func SendMessage ¶
SendMessage is the handler for tools/message endpoint.
func TipsDiagnosticHandler ¶
TipsDiagnosticHandler runs tips diagnostic over the Tangle.
Types ¶
type ApprovalResponse ¶
type ApprovalResponse struct {
Err error `json:"error,omitempty"`
}
ApprovalResponse is the HTTP response.
type ByArrival ¶
type ByArrival []MsgInfo
ByArrival defines a slice of MsgInfo sortable by arrival time.
type ByIssuance ¶
type ByIssuance []MsgInfo
ByIssuance defines a slice of MsgInfo sortable by timestamp issuance.
func (ByIssuance) Len ¶
func (a ByIssuance) Len() int
func (ByIssuance) Less ¶
func (a ByIssuance) Less(i, j int) bool
func (ByIssuance) Swap ¶
func (a ByIssuance) Swap(i, j int)
type DiagnosticBranchInfo ¶
type DiagnosticBranchInfo struct {
ID string
ConflictSet []string
IssuanceTimestamp time.Time
SolidTime time.Time
LazyBooked bool
GradeOfFinality gof.GradeOfFinality
}
DiagnosticBranchInfo holds the information of a branch.
type DiagnosticMessagesInfo ¶
type DiagnosticMessagesInfo struct {
ID string
IssuerID string
IssuerPublicKey string
IssuanceTimestamp time.Time
ArrivalTime time.Time
SolidTime time.Time
ScheduledTime time.Time
BookedTime time.Time
GradeOfFinality gof.GradeOfFinality
GradeOfFinalityTime time.Time
StrongParents []string
WeakParents []string
ShallowDislikeParents []string
ShallowLikeParents []string
StrongApprovers []string
WeakApprovers []string
ShallowLikeApprovers []string
ShallowDislikeApprovers []string
BranchIDs []string
AddedBranchIDs []string
SubtractedBranchIDs []string
Scheduled bool
Booked bool
ObjectivelyInvalid bool
Rank uint64
IsPastMarker bool
PastMarkers string // PastMarkers
PMHI uint64 // PastMarkers Highest Index
PMLI uint64 // PastMarkers Lowest Index
FutureMarkers string // FutureMarkers
FMHI uint64 // FutureMarkers Highest Index
FMLI uint64 // FutureMarkers Lowest Index
PayloadType string
TransactionID string
}
DiagnosticMessagesInfo holds the information of a message.
type DiagnosticUTXODAGInfo ¶
type DiagnosticUTXODAGInfo struct {
// transaction essence
ID string
IssuanceTimestamp time.Time
SolidTime time.Time
AccessManaPledgeID string
ConsensusManaPledgeID string
Inputs ledgerstate.Inputs
Outputs ledgerstate.Outputs
// attachments
Attachments []string
// transaction metadata
BranchIDs []string
Conflicting bool
LazyBooked bool
GradeOfFinality gof.GradeOfFinality
GradeOfFinalityTime time.Time
}
DiagnosticUTXODAGInfo holds the information of a UTXO.
type MsgApproval ¶
type MsgApproval struct {
NodeID string
Msg MsgInfo
FirstApproverByIssuance MsgInfo
FirstApproverByArrival MsgInfo
FirstApproverBySolid MsgInfo
}
MsgApproval holds the information of the first approval by issucane, arrival and solid time.
type MsgInfo ¶
type MsgInfo struct {
MsgID string
MsgIssuerID string
MsgIssuanceTimestamp time.Time
MsgArrivalTime time.Time
MsgSolidTime time.Time
}
MsgInfo holds the information of a message.
type MsgInfoOrphanage ¶
type MsgInfoOrphanage struct {
MsgID tangle.MessageID
MsgIssuerID ed25519.PublicKey
MsgIssuanceTimestamp time.Time
MsgArrivalTime time.Time
MsgSolidTime time.Time
MsgApprovedBy bool
}
MsgInfoOrphanage holds the information of a message.
type OrphanageResponse ¶
type OrphanageResponse struct {
Err string `json:"error,omitempty"`
}
OrphanageResponse is the HTTP response.
type ParametersDefinition ¶
type ParametersDefinition struct {
// Export path
ExportPath string `default:"." usage:"default export path"`
}
ParametersDefinition contains the definition of configuration parameters.