Documentation ¶
Index ¶
- Constants
- Variables
- func LogCrit(msg string, ctx ...interface{})
- func LogDebug(msg string, ctx ...interface{})
- func LogError(msg string, ctx ...interface{})
- func LogInfo(msg string, ctx ...interface{})
- func LogTrace(msg string, ctx ...interface{})
- func LogWarn(msg string, ctx ...interface{})
- func NewServer(privkey *ecdsa.PrivateKey, name string, version string, proto *p2p.Protocol, ...) *p2p.Server
- func NewServiceNode(port int, httpport int, wsport int, modules ...string) (*node.Node, error)
- func NewServiceNodeWithPrivateKey(privateKey *ecdsa.PrivateKey, port int, httpport int, wsport int, ...) (*node.Node, error)
- func NewServiceNodeWithPrivateKeyAndDataDir(privateKey *ecdsa.PrivateKey, dataDir string, port int, httpport int, ...) (*node.Node, error)
- func NewServiceNodeWithPrivateKeyAndDataDirAndProtocols(privateKey *ecdsa.PrivateKey, dataDir string, port int, httpport int, ...) (*node.Node, error)
- func NewServiceNodeWithPrivateKeyAndProtocols(privateKey *ecdsa.PrivateKey, port int, httpport int, wsport int, ...) (*node.Node, error)
- func NewSwarmServiceWithProtocol(stack *node.Node, bzzport int, specs []*protocols.Spec, ...) func(ctx *node.ServiceContext) (node.Service, error)
- func NewSwarmServiceWithProtocolAndPrivateKey(stack *node.Node, bzzport int, specs []*protocols.Spec, ...) func(ctx *node.ServiceContext) (node.Service, error)
- func RandomID() (id enode.ID)
- func ToJSON(obj interface{}) string
- func WaitForCtrlC()
- func WaitHealthy(ctx context.Context, minbinsize int, rpcs ...*rpc.Client) error
Constants ¶
View Source
const ( BzzDefaultNetworkId = 4242 WSDefaultPort = 18543 BzzDefaultPort = 8542 P2pPort = 30100 IPCName = "demo.ipc" DatadirPrefix = ".data_" )
Variables ¶
View Source
var ( // custom log, easily grep'able Log = log.New("DemoLog", "v1.0.1") // our working directory BasePath string )
Functions ¶
func NewServer ¶
func NewServer(privkey *ecdsa.PrivateKey, name string, version string, proto *p2p.Protocol, port int) *p2p.Server
NewServer : create a server
func NewServiceNode ¶
NewServiceNode : set up the local service node
func NewSwarmServiceWithProtocol ¶
func NewSwarmServiceWithProtocol(stack *node.Node, bzzport int, specs []*protocols.Spec, protocols []*p2p.Protocol, topic *pss.Topic, pssprotos *[]*pss.Protocol) func(ctx *node.ServiceContext) (node.Service, error)
NewSwarmServiceWithProtocol : create new swarm service with protocol and topic
func WaitForCtrlC ¶
func WaitForCtrlC()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.