gossip

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 13 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

This section is empty.

Types

type GossipBlacklistCmd

type GossipBlacklistCmd struct {
	*base.Base
	*GossipState
	PeerID flags.PeerIDFlag `ask:"<peer-id>" help:"The peer to blacklist"`
}

func (*GossipBlacklistCmd) Help

func (c *GossipBlacklistCmd) Help() string

func (*GossipBlacklistCmd) Run

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

type GossipCmd

type GossipCmd struct {
	*base.Base
	*GossipState
}

func (*GossipCmd) Cmd

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

func (*GossipCmd) Help

func (c *GossipCmd) Help() string

func (*GossipCmd) Routes

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

type GossipEventsCmd

type GossipEventsCmd struct {
	*base.Base
	*GossipState
	TopicName string `ask:"<topic>" help:"The name of the topic to track events of"`
}

func (*GossipEventsCmd) Help

func (c *GossipEventsCmd) Help() string

func (*GossipEventsCmd) Run

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

type GossipJoinCmd

type GossipJoinCmd struct {
	*base.Base
	*GossipState
	TopicName string `ask:"<topic>" help:"The name of the topic to join"`
}

func (*GossipJoinCmd) Help

func (c *GossipJoinCmd) Help() string

func (*GossipJoinCmd) Run

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

type GossipLeaveCmd

type GossipLeaveCmd struct {
	*base.Base
	*GossipState
	TopicName string `ask:"<topic>" help:"The name of the topic to leave"`
}

func (*GossipLeaveCmd) Help

func (c *GossipLeaveCmd) Help() string

func (*GossipLeaveCmd) Run

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

type GossipListCmd

type GossipListCmd struct {
	*base.Base
	*GossipState
}

func (*GossipListCmd) Help

func (c *GossipListCmd) Help() string

func (*GossipListCmd) Run

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

type GossipListPeersCmd

type GossipListPeersCmd struct {
	*base.Base
	*GossipState
	TopicName string `ask:"<topic>" help:"The name of the topic to list peers of"`
}

func (*GossipListPeersCmd) Help

func (c *GossipListPeersCmd) Help() string

func (*GossipListPeersCmd) Run

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

type GossipLogCmd

type GossipLogCmd struct {
	*base.Base
	*GossipState
	TopicName string `ask:"<topic>" help:"The name of the topic to log messages of"`
}

func (*GossipLogCmd) Help

func (c *GossipLogCmd) Help() string

func (*GossipLogCmd) Run

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

type GossipPublishCmd

type GossipPublishCmd struct {
	*base.Base
	*GossipState
	TopicName string `ask:"<topic>" help:"The name of the topic to publish to"`
	Message   []byte `ask:"<message>" help:"The uncompressed message bytes, hex-encoded"`
}

func (*GossipPublishCmd) Help

func (c *GossipPublishCmd) Help() string

func (*GossipPublishCmd) Run

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

type GossipStartCmd

type GossipStartCmd struct {
	*base.Base
	*GossipState
}

func (*GossipStartCmd) Help

func (c *GossipStartCmd) Help() string

func (*GossipStartCmd) Run

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

type GossipState

type GossipState struct {
	GsNode  gossip.GossipSub
	CloseGS context.CancelFunc
	// string -> *pubsub.Topic
	Topics sync.Map
}

Jump to

Keyboard shortcuts

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