peerstore

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateCmd

type CreateCmd struct {
	*base.Base

	GlobalPeerstores track.Peerstores
	CurrentPeerstore track.DynamicPeerstore

	ID        track.PeerstoreID `ask:"[id]" help:"ID of the peerstore, random otherwise"`
	Switch    bool              `ask:"--switch" help:"If the host should immediately switch to the newly created peerstore"`
	StoreType string            `ask:"--store-type" help:"The type of datastore to use. Options: 'mem', 'leveldb', 'badger'"`
	StorePath string            `ask:"--store-path" help:"The path of the datastore, must be empty for memory store."`
}

func (*CreateCmd) Default

func (c *CreateCmd) Default()

func (*CreateCmd) Help

func (c *CreateCmd) Help() string

func (*CreateCmd) Run

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

type ListCmd

type ListCmd struct {
	*base.Base

	GlobalPeerstores track.Peerstores
	CurrentPeerstore track.DynamicPeerstore
}

func (*ListCmd) Help

func (c *ListCmd) Help() string

func (*ListCmd) Run

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

type PeerstoreCmd

type PeerstoreCmd struct {
	*base.Base

	GlobalPeerstores track.Peerstores
	CurrentPeerstore track.DynamicPeerstore
}

func (*PeerstoreCmd) Cmd

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

func (*PeerstoreCmd) Help

func (c *PeerstoreCmd) Help() string

func (*PeerstoreCmd) Routes

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

type SwitchCmd

type SwitchCmd struct {
	*base.Base

	GlobalPeerstores track.Peerstores
	CurrentPeerstore track.DynamicPeerstore

	ID track.PeerstoreID `ask:"<id>" help:"ID of the peerstore to switch to"`
}

func (*SwitchCmd) Help

func (c *SwitchCmd) Help() string

func (*SwitchCmd) Run

func (c *SwitchCmd) 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