topic

package
v0.2.4-0...-f8342f3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoGossipErr = errors.New("Must start gossip-sub first. Try 'gossip start'")

Functions

func AddMsgToMsgDB

func AddMsgToMsgDB(msgDB *database.MessageDatabase, rawMsg []byte, sender peer.ID, arrTime time.Time, msgID string, topic string) error

Types

type TopicCmd

type TopicCmd struct {
	*base.Base
	GossipState   *metrics.GossipState
	GossipMetrics *metrics.GossipMetrics
	Store         track.ExtendedPeerstore
}

func (*TopicCmd) Cmd

func (c *TopicCmd) Cmd(route string) (cmd interface{}, err error)

func (*TopicCmd) Help

func (c *TopicCmd) Help() string

func (*TopicCmd) Routes

func (c *TopicCmd) Routes() []string

type TopicEventsCmd

type TopicEventsCmd struct {
	*base.Base
	GossipState   *metrics.GossipState
	GossipMetrics *metrics.GossipMetrics
	Store         track.ExtendedPeerstore
	//TopicName string `ask:"<topic>" help:"The name of the topic to track events of"`
	Eth2TopicName string `ask:"--eth-topic" help:"The name of the eth2 topics"`
	ForkDigest    string `ask:"--fork-version" help:"The fork digest value of the network we want to join to (Default Mainnet)"`
	Encoding      string `ask:"--encoding" help:"Encoding that is getting used"`
}

func (*TopicEventsCmd) Default

func (c *TopicEventsCmd) Default()

func (*TopicEventsCmd) Help

func (c *TopicEventsCmd) Help() string

func (*TopicEventsCmd) Run

func (c *TopicEventsCmd) Run(ctx context.Context, args ...string) error

type TopicExportMetricsCmd

type TopicExportMetricsCmd struct {
	*base.Base
	GossipMetrics *metrics.GossipMetrics
	GossipState   *metrics.GossipState
	Store         track.ExtendedPeerstore
	ExportPeriod  time.Duration `ask:"--export-period" help:"Requets the frecuency in witch the Metrics will be exported to the files"`
	FilePath      string        `ask:"--file-path" help:"The path of the file where to export the metrics."`
	PeerstorePath string        `ask:"--peerstore-path" help:"The path of the file where to export the peerstore."`
	CsvPath       string        `ask:"--csv-file" help:"The path where the csv file will be exported"`
}

func (*TopicExportMetricsCmd) Defaul

func (c *TopicExportMetricsCmd) Defaul()

func (*TopicExportMetricsCmd) Help

func (c *TopicExportMetricsCmd) Help() string

func (*TopicExportMetricsCmd) Run

func (c *TopicExportMetricsCmd) Run(ctx context.Context, args ...string) error

type TopicJoinCmd

type TopicJoinCmd struct {
	*base.Base
	GossipState   *metrics.GossipState
	Eth2TopicName string `ask:"--eth-topic" help:"The name of the eth2 topics"`
	ForkDigest    string `ask:"--fork-version" help:"The fork digest value of the network we want to join to (Default Mainnet)"`
	Encoding      string `ask:"--encoding" help:"Encoding that is getting used"`
}

func (*TopicJoinCmd) Default

func (c *TopicJoinCmd) Default()

func (*TopicJoinCmd) Help

func (c *TopicJoinCmd) Help() string

func (*TopicJoinCmd) Run

func (c *TopicJoinCmd) Run(ctx context.Context, args ...string) error

type TopicLeaveCmd

type TopicLeaveCmd struct {
	*base.Base
	GossipState   *metrics.GossipState
	Eth2TopicName string `ask:"--eth-topic" help:"The name of the eth2 topics"`
	ForkDigest    string `ask:"--fork-version" help:"The fork digest value of the network we want to join to (Default Mainnet)"`
	Encoding      string `ask:"--encoding" help:"Encoding that is getting used"`
}

func (*TopicLeaveCmd) Default

func (c *TopicLeaveCmd) Default()

func (*TopicLeaveCmd) Help

func (c *TopicLeaveCmd) Help() string

func (*TopicLeaveCmd) Run

func (c *TopicLeaveCmd) Run(ctx context.Context, args ...string) error

type TopicListPeersCmd

type TopicListPeersCmd struct {
	*base.Base
	GossipState   *metrics.GossipState
	Eth2TopicName string `ask:"--eth-topic" help:"The name of the eth2 topics"`
	ForkDigest    string `ask:"--fork-version" help:"The fork digest value of the network we want to join to (Default Mainnet)"`
	Encoding      string `ask:"--encoding" help:"Encoding that is getting used"`
}

func (*TopicListPeersCmd) Default

func (c *TopicListPeersCmd) Default()

func (*TopicListPeersCmd) Run

func (c *TopicListPeersCmd) Run(ctx context.Context, args ...string) error

type TopicLogCmd

type TopicLogCmd struct {
	*base.Base
	GossipMetrics *metrics.GossipMetrics
	GossipState   *metrics.GossipState
	Eth2TopicName string `ask:"--eth-topic" help:"The name of the eth2 topics"`
	ForkDigest    string `ask:"--fork-version" help:"The fork digest value of the network we want to join to (Default Mainnet)"`
	Encoding      string `ask:"--encoding" help:"Encoding that is getting used"`
}

func (*TopicLogCmd) Default

func (c *TopicLogCmd) Default()

func (*TopicLogCmd) Help

func (c *TopicLogCmd) Help() string

func (*TopicLogCmd) Run

func (c *TopicLogCmd) Run(ctx context.Context, args ...string) error

type TopicPublishCmd

type TopicPublishCmd struct {
	*base.Base
	GossipState   *metrics.GossipState
	Eth2TopicName string `ask:"--eth-topic" help:"The name of the eth2 topics"`
	ForkDigest    string `ask:"--fork-version" help:"The fork digest value of the network we want to join to (Default Mainnet)"`
	Encoding      string `ask:"--encoding" help:"Encoding that is getting used"`
	Message       []byte `ask:"<message>" help:"The uncompressed message bytes, hex-encoded"`
}

func (*TopicPublishCmd) Default

func (c *TopicPublishCmd) Default()

func (*TopicPublishCmd) Help

func (c *TopicPublishCmd) Help() string

func (*TopicPublishCmd) Run

func (c *TopicPublishCmd) Run(ctx context.Context, args ...string) error

Jump to

Keyboard shortcuts

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