tracer

package
v1.23.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0, MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ElasticSearchDefaultIndex = "lotus-pubsub"
)
View Source
const (
	TraceEventPeerScores pubsub_pb.TraceEvent_Type = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LotusTraceEvent

type LotusTraceEvent struct {
	Type       pubsub_pb.TraceEvent_Type `json:"type,omitempty"`
	PeerID     string                    `json:"peerID,omitempty"`
	Timestamp  *int64                    `json:"timestamp,omitempty"`
	PeerScore  TraceEventPeerScore       `json:"peerScore,omitempty"`
	SourceAuth string                    `json:"sourceAuth,omitempty"`
}

type LotusTracer

type LotusTracer interface {
	Trace(evt *pubsub_pb.TraceEvent)
	TraceLotusEvent(evt *LotusTraceEvent)

	PeerScores(scores map[peer.ID]*pubsub.PeerScoreSnapshot)
}

func NewLotusTracer

func NewLotusTracer(tt []TracerTransport, pid peer.ID, sourceAuth string) LotusTracer

type TopicScore

type TopicScore struct {
	Topic                    string        `json:"topic"`
	TimeInMesh               time.Duration `json:"timeInMesh"`
	FirstMessageDeliveries   float64       `json:"firstMessageDeliveries"`
	MeshMessageDeliveries    float64       `json:"meshMessageDeliveries"`
	InvalidMessageDeliveries float64       `json:"invalidMessageDeliveries"`
}

type TraceEventPeerScore

type TraceEventPeerScore struct {
	PeerID             string       `json:"peerID"`
	Score              float64      `json:"score"`
	AppSpecificScore   float64      `json:"appSpecificScore"`
	IPColocationFactor float64      `json:"ipColocationFactor"`
	BehaviourPenalty   float64      `json:"behaviourPenalty"`
	Topics             []TopicScore `json:"topics"`
}

type TracerTransport

type TracerTransport interface {
	Transport(evt TracerTransportEvent) error
}

func NewElasticSearchTransport

func NewElasticSearchTransport(connectionString string, elasticsearchIndex string) (TracerTransport, error)

func NewJsonTracerTransport

func NewJsonTracerTransport(file string) (TracerTransport, error)

type TracerTransportEvent

type TracerTransportEvent struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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