swarm: github.com/ethersphere/swarm Index | Files | Directories

package swarm

import "github.com/ethersphere/swarm"

Index

Package Files

swarm.go

type Info Uses

type Info struct {
    *api.Config
}

Info represents the current Swarm node's configuration

func (*Info) Info Uses

func (i *Info) Info() *Info

Info returns the current Swarm configuration

type Swarm Uses

type Swarm struct {
    // contains filtered or unexported fields
}

Swarm abstracts the complete Swarm stack

func NewSwarm Uses

func NewSwarm(config *api.Config, mockStore *mock.NodeStore) (self *Swarm, err error)

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 Uses

func (s *Swarm) APIs() []rpc.API

APIs returns the RPC API descriptors the Swarm implementation offers implements node.Service

func (*Swarm) Protocols Uses

func (s *Swarm) Protocols() (protos []p2p.Protocol)

Protocols implements the node.Service interface

func (*Swarm) RegisterPssProtocol Uses

func (s *Swarm) RegisterPssProtocol(topic *pssmessage.Topic, spec *protocols.Spec, targetprotocol *p2p.Protocol, options *pss.ProtocolParams) (*pss.Protocol, error)

RegisterPssProtocol adds a devp2p protocol to the swarm node's Pss instance

func (*Swarm) Start Uses

func (s *Swarm) Start(srv *p2p.Server) error

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

func (*Swarm) Stop Uses

func (s *Swarm) Stop() error

Stop stops all component services. Implements the node.Service interface.

Directories

PathSynopsis
api
api/client
api/httpA simple http server interface to Swarm
api/http/langos
bmtPackage bmt provides a binary merkle tree implementation used for swarm chunk hash
bmt/testutil
bzzeth
chunk
chunk/testing
client
contracts/ens
contracts/ens/contract
contracts/ens/fallback_contract
contracts/swapPackage swap wraps the 'swap' Ethereum smart contract.
file
file/bmt
file/hasher
fuse
internal/build
internal/cmdtest
internal/debugPackage debug interfaces Go runtime debugging facilities.
internal/flags
log
metrics
metrics/influxdb
network
network/bitvector
network/capability
network/priorityqueue
network/pubsubchannel
network/resourceusestats
network/retrieval
network/simulation
network/simulationsYou can run this simulation using
network/simulations/discovery
network/stream
network/stream/intervals
network/timeouts
p2p/protocolsPackage protocols is an extension to p2p.
p2p/testing
potPackage pot see doc.go
pssPss provides devp2p functionality for swarm nodes without the need for a direct tcp connection between them.
pss/clientsimple abstraction for implementing pss functionality
pss/crypto
pss/internal/ticker
pss/internal/ttlset
pss/message
pss/notify
pss/outbox
pushsync
sctx
shedPackage shed provides a simple abstraction components to compose more complex operations on storage data organized in fields and indexes.
simulation
spancontext
state
storage
storage/encryption
storage/feedPackage feeds defines Swarm Feeds.
storage/feed/lookupPackage lookup defines feed lookup algorithms and provides tools to place updates so they can be found
storage/localstorePackage localstore provides disk storage layer for Swarm Chunk persistence.
storage/mockPackage mock defines types that are used by different implementations of mock storages.
storage/mock/dbPackage db implements a mock store that keeps all chunk data in LevelDB database.
storage/mock/explorer
storage/mock/memPackage mem implements a mock store that keeps all chunk data in memory.
storage/mock/rpcPackage rpc implements an RPC client that connect to a centralized mock store.
storage/mock/testPackage test provides functions that are used for testing GlobalStorer implementations.
storage/pin
swap
swap/chain
swap/chain/mock
swap/int256
testutil
tracing
version

Package swarm imports 42 packages (graph) and is imported by 4 packages. Updated 2021-01-15. Refresh now. Tools for package owners.