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 []byte `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 TraceEventPeerScore ¶
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
}
Click to show internal directories.
Click to hide internal directories.