Documentation ¶
Index ¶
Constants ¶
const ( Chain = "chain" TRC = "trc" )
Trust material
const ( TRCReq = "trc_request" ChainReq = "chain_request" NotifyTRC = "trc_notify" LatestTRC = "latest_trc_number" )
Request types
const ( SigVerification = "signature_verification" ASInspector = "trc_inspection" App = "application" )
Triggers
const ( Success = prom.Success OkExists = "ok_exists" OkInserted = "ok_inserted" OkIgnored = "ok_ignored" ErrMismatch = "err_content_mismatch" ErrDB = prom.ErrDB ErrInactive = "err_inactive" ErrInternal = prom.ErrInternal ErrKey = "err_key" ErrNotAllowed = "err_not_allowed" ErrNotFound = "err_not_found" ErrParse = prom.ErrParse ErrTransmit = "err_transmit" ErrValidate = prom.ErrValidate ErrVerify = prom.ErrVerify )
Result types
const Namespace = "trustengine"
Namespace is the prometheus namespace.
Variables ¶
var ( // Provider exposes the provider metrics. Provider = newProvider() // RPC exposes the RPC metrics. RPC = newRPC() // Signer exposes the signer metrics. Signer = newSigner() // Verifier exposes the verifier metrics. Verifier = newVerifier() )
Functions ¶
func FromCtx ¶
FromCtx returns the trigger embedded in ctx if one exists, or "application" otherwise.
func PeerToLabel ¶
PeerToLabel converts the peer address to a peer metric label.
Types ¶
type ProviderLabels ¶
ProviderLabels defines the trust material provider labels.
func (ProviderLabels) Labels ¶
func (l ProviderLabels) Labels() []string
Labels returns the list of labels.
func (ProviderLabels) Values ¶
func (l ProviderLabels) Values() []string
Values returns the label values in the order defined by Labels.
func (ProviderLabels) WithResult ¶
func (l ProviderLabels) WithResult(result string) ProviderLabels
WithResult returns the lookup labels with the modified result.
type RPCLabels ¶
RPCLabels defines the trust material RPC labels.
func (RPCLabels) WithResult ¶
WithResult returns the lookup labels with the modified result.
type SignerLabels ¶
type SignerLabels struct {
Result string
}
SignerLabels defines the trust material signer labels.
func (SignerLabels) Labels ¶
func (l SignerLabels) Labels() []string
Labels returns the list of labels.
func (SignerLabels) Values ¶
func (l SignerLabels) Values() []string
Values returns the label values in the order defined by Labels.
func (SignerLabels) WithResult ¶
func (l SignerLabels) WithResult(result string) SignerLabels
WithResult returns the lookup labels with the modified result.
type VerifierLabels ¶
type VerifierLabels struct {
Result string
}
VerifierLabels defines the trust material resolver labels.
func (VerifierLabels) Labels ¶
func (l VerifierLabels) Labels() []string
Labels returns the list of labels.
func (VerifierLabels) Values ¶
func (l VerifierLabels) Values() []string
Values returns the label values in the order defined by Labels.
func (VerifierLabels) WithResult ¶
func (l VerifierLabels) WithResult(result string) VerifierLabels
WithResult returns the lookup labels with the modified result.