message

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0, BSD-2-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
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"
	// RouteDiagnosticsLazyBookedBranches is the API route for booked branches diagnostics.
	RouteDiagnosticsLazyBookedBranches = RouteDiagnosticsBranches + "/lazybooked"
	// RouteDiagnosticsInvalidBranches is the API route for invalid branches diagnostics.
	RouteDiagnosticsInvalidBranches = RouteDiagnosticsBranches + "/invalid"
	// RouteDiagnosticsTips is the API route for tips diagnostics.
	RouteDiagnosticsTips = routeDiagnostics + "/tips"
	// RouteDiagnosticsStrongTips is the API route for strong tips diagnostics.
	RouteDiagnosticsStrongTips = RouteDiagnosticsTips + "/strong"
	// RouteDiagnosticsWeakTips is the API route for weak tips diagnostics.
	RouteDiagnosticsWeakTips = RouteDiagnosticsTips + "/weak"
)
View Source
const PluginName = "WebAPIToolsMessageEndpoint"

PluginName is the name of the web API tools messages endpoint plugin.

Variables

View Source
var DiagnosticBranchesTableDescription = []string{
	"ID",
	"ConflictSet",
	"IssuanceTime",
	"SolidTime",
	"LazyBooked",
	"GradeOfFinality",
}

DiagnosticBranchesTableDescription holds the description of the diagnostic Branches.

View Source
var DiagnosticMessagesTableDescription = []string{
	"ID",
	"IssuerID",
	"IssuerPublicKey",
	"IssuanceTime",
	"ArrivalTime",
	"SolidTime",
	"ScheduledTime",
	"BookedTime",
	"GradeOfFinality",
	"GradeOfFinalityTime",
	"StrongParents",
	"WeakParents",
	"DislikeParents",
	"LikeParents",
	"StrongApprovers",
	"WeakApprovers",
	"BranchID",
	"Scheduled",
	"ScheduledBypass",
	"Booked",
	"Invalid",
	"Rank",
	"IsPastMarker",
	"PastMarkers",
	"PMHI",
	"PMLI",
	"FutureMarkers",
	"FMHI",
	"FMLI",
	"PayloadType",
	"TransactionID",
}

DiagnosticMessagesTableDescription holds the description of the diagnostic messages.

View Source
var DiagnosticUTXODAGTableDescription = []string{
	"ID",
	"IssuanceTime",
	"SolidTime",
	"AccessManaPledgeID",
	"ConsensusManaPledgeID",
	"Inputs",
	"Outputs",
	"Attachments",
	"BranchID",
	"Conflicting",
	"LazyBooked",
	"GradeOfFinality",
	"GradeOfFinalityTime",
}

DiagnosticUTXODAGTableDescription holds the description of the diagnostic UTXODAG.

View Source
var Parameters = &ParametersDefinition{}

Parameters contains the configuration parameters of the web API tools endpoint plugin.

View Source
var (
	// Plugin is the plugin instance of the web API tools messages endpoint plugin.
	Plugin = node.NewPlugin(PluginName, deps, node.Enabled, configure)
)
View Source
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.

View Source
var TableDescriptionOrphanage = []string{
	"MsgID",
	"MsgIssuerID",
	"MsgIssuanceTime",
	"MsgArrivalTime",
	"MsgSolidTime",
	"MsgApprovedBy",
}

TableDescriptionOrphanage holds the description of the First Approval analysis table.

Functions

func ApprovalHandler added in v0.3.6

func ApprovalHandler(c echo.Context) error

ApprovalHandler runs the approval analysis.

func DiagnosticBranchesHandler added in v0.5.3

func DiagnosticBranchesHandler(c echo.Context) (err error)

DiagnosticBranchesHandler runs the diagnostic over the Tangle.

func DiagnosticInvalidBranchesHandler added in v0.5.3

func DiagnosticInvalidBranchesHandler(c echo.Context) (err error)

DiagnosticInvalidBranchesHandler runs the diagnostic over the Tangle.

func DiagnosticLazyBookedBranchesHandler added in v0.5.3

func DiagnosticLazyBookedBranchesHandler(c echo.Context) (err error)

DiagnosticLazyBookedBranchesHandler runs the diagnostic over the Tangle.

func DiagnosticMessagesHandler added in v0.5.3

func DiagnosticMessagesHandler(c echo.Context) (err error)

DiagnosticMessagesHandler runs the diagnostic over the Tangle.

func DiagnosticMessagesOnlyFirstWeakReferencesHandler added in v0.5.3

func DiagnosticMessagesOnlyFirstWeakReferencesHandler(c echo.Context) (err error)

DiagnosticMessagesOnlyFirstWeakReferencesHandler runs the diagnostic over the Tangle.

func DiagnosticMessagesRankHandler added in v0.5.3

func DiagnosticMessagesRankHandler(c echo.Context) (err error)

DiagnosticMessagesRankHandler runs the diagnostic over the Tangle for messages with rank >= of the given rank parameter.

func DiagnosticUTXODAGHandler added in v0.5.3

func DiagnosticUTXODAGHandler(c echo.Context) (err error)

DiagnosticUTXODAGHandler runs the diagnostic over the Tangle.

func MissingHandler

func MissingHandler(c echo.Context) error

MissingHandler process missing requests.

func OrphanageHandler added in v0.4.1

func OrphanageHandler(c echo.Context) error

OrphanageHandler runs the orphanage analysis.

func PastconeHandler

func PastconeHandler(c echo.Context) error

PastconeHandler process a pastcone request.

func TipsDiagnosticHandler added in v0.5.4

func TipsDiagnosticHandler(c echo.Context) error

TipsDiagnosticHandler runs tips diagnostic over the Tangle.

Types

type ApprovalResponse added in v0.3.6

type ApprovalResponse struct {
	Err error `json:"error,omitempty"`
}

ApprovalResponse is the HTTP response.

type ByArrival added in v0.3.6

type ByArrival []MsgInfo

ByArrival defines a slice of MsgInfo sortable by arrival time.

func (ByArrival) Len added in v0.3.6

func (a ByArrival) Len() int

func (ByArrival) Less added in v0.3.6

func (a ByArrival) Less(i, j int) bool

func (ByArrival) Swap added in v0.3.6

func (a ByArrival) Swap(i, j int)

type ByIssuance added in v0.3.6

type ByIssuance []MsgInfo

ByIssuance defines a slice of MsgInfo sortable by timestamp issuance.

func (ByIssuance) Len added in v0.3.6

func (a ByIssuance) Len() int

func (ByIssuance) Less added in v0.3.6

func (a ByIssuance) Less(i, j int) bool

func (ByIssuance) Swap added in v0.3.6

func (a ByIssuance) Swap(i, j int)

type BySolid added in v0.3.6

type BySolid []MsgInfo

BySolid defines a slice of MsgInfo sortable by solid time.

func (BySolid) Len added in v0.3.6

func (a BySolid) Len() int

func (BySolid) Less added in v0.3.6

func (a BySolid) Less(i, j int) bool

func (BySolid) Swap added in v0.3.6

func (a BySolid) Swap(i, j int)

type DiagnosticBranchInfo added in v0.5.3

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 added in v0.5.3

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       tangle.MessageIDs
	WeakParents         tangle.MessageIDs
	DislikeParents      tangle.MessageIDs
	LikeParents         tangle.MessageIDs
	StrongApprovers     tangle.MessageIDs
	WeakApprovers       tangle.MessageIDs
	BranchID            string
	Scheduled           bool
	ScheduledBypass     bool
	Booked              bool
	Invalid             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 added in v0.5.3

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
	BranchID            string
	Conflicting         bool
	LazyBooked          bool
	GradeOfFinality     gof.GradeOfFinality
	GradeOfFinalityTime time.Time
}

DiagnosticUTXODAGInfo holds the information of a UTXO.

type MsgApproval added in v0.3.6

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 added in v0.3.6

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 added in v0.4.1

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 added in v0.4.1

type OrphanageResponse struct {
	Err string `json:"error,omitempty"`
}

OrphanageResponse is the HTTP response.

type ParametersDefinition added in v0.7.6

type ParametersDefinition struct {
	// Export path
	ExportPath string `default:"." usage:"default export path"`
}

ParametersDefinition contains the definition of configuration parameters.

Jump to

Keyboard shortcuts

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