Documentation ¶
Index ¶
- type Info
- type Swarm
- func (self *Swarm) API() *SwarmAPI
- func (self *Swarm) APIs() []rpc.API
- func (self *Swarm) Api() *api.API
- func (self *Swarm) Protocols() (protos []p2p.Protocol)
- func (self *Swarm) RegisterPssProtocol(spec *protocols.Spec, targetprotocol *p2p.Protocol, ...) (*pss.Protocol, error)
- func (self *Swarm) SetChequebook(ctx context.Context) error
- func (self *Swarm) Start(srv *p2p.Server) error
- func (self *Swarm) Stop() error
- type SwarmAPI
- type Voidstore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Swarm ¶
type Swarm struct {
// contains filtered or unexported fields
}
the swarm stack
func NewSwarm ¶
creates a new swarm service instance implements node.Service If mockStore is not nil, it will be used as the storage for chunk data. MockStore should be used only for testing.
func (*Swarm) APIs ¶
implements node.Service APIs returns the RPC API descriptors the Swarm implementation offers
func (*Swarm) RegisterPssProtocol ¶ added in v0.3.3
func (*Swarm) SetChequebook ¶
SetChequebook ensures that the local checquebook is set up on chain.
func (*Swarm) Start ¶
Start is called when the stack is started * starts the network kademlia hive peer management * (starts netStore level 0 api) * starts DPA level 1 api (chunking -> store/retrieve requests) * (starts level 2 api) * starts http proxy server * registers url scheme handlers for bzz, etc * TODO: start subservices like sword, swear, swarmdns
implements the node.Service interface
Directories ¶
Path | Synopsis |
---|---|
http
A simple http server interface to Swarm
|
A simple http server interface to Swarm |
Package bmt provides a binary merkle tree implementation used for swarm chunk hash
|
Package bmt provides a binary merkle tree implementation used for swarm chunk hash |
simulations
You can run this simulation using
|
You can run this simulation using |
Package pot see doc.go
|
Package pot see doc.go |
Pss provides devp2p functionality for swarm nodes without the need for a direct tcp connection between them.
|
Pss provides devp2p functionality for swarm nodes without the need for a direct tcp connection between them. |
client
simple abstraction for implementing pss functionality
|
simple abstraction for implementing pss functionality |
services
|
|
feed
Package feeds defines Swarm Feeds.
|
Package feeds defines Swarm Feeds. |
feed/lookup
Package lookup defines feed lookup algorithms and provides tools to place updates so they can be found
|
Package lookup defines feed lookup algorithms and provides tools to place updates so they can be found |
mock
Package mock defines types that are used by different implementations of mock storages.
|
Package mock defines types that are used by different implementations of mock storages. |
mock/db
Package db implements a mock store that keeps all chunk data in LevelDB database.
|
Package db implements a mock store that keeps all chunk data in LevelDB database. |
mock/mem
Package mem implements a mock store that keeps all chunk data in memory.
|
Package mem implements a mock store that keeps all chunk data in memory. |
mock/rpc
Package rpc implements an RPC client that connect to a centralized mock store.
|
Package rpc implements an RPC client that connect to a centralized mock store. |
mock/test
Package test provides functions that are used for testing GlobalStorer implementations.
|
Package test provides functions that are used for testing GlobalStorer implementations. |