Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StartEngine = cli.Command{ Flags: []cli.Flag{ cli.StringFlag{ Name: "dev-server", Destination: &devServerAddr, }, }, Name: "engine:start", Action: func(c *cli.Context) error { h, err := lp2p.New(context.Background(), lp2p.Defaults, config) if err != nil { panic(err) } addr, err := ma.NewMultiaddr(devServerAddr) if err != nil { fmt.Println(err) return nil } client := &DAppClient{} registry := reg.NewDAppRegistry(h, client) client.startDApp = func(dApp dapp.JsonRepresentation) error { return registry.StartDApp(&dApp) } if err := registry.ConnectDevelopmentServer(addr); err != nil { panic(err) } fmt.Println("started engine") http.HandleFunc("/ws", wsHandler) go func() { err := http.ListenAndServe(":4839", nil) if err != nil { panic(err) } }() select {} return nil }, }
Functions ¶
This section is empty.
Types ¶
type DAppClient ¶
type DAppClient struct {
// contains filtered or unexported fields
}
func (*DAppClient) HandleReceivedDApp ¶
func (c *DAppClient) HandleReceivedDApp(dApp dapp.JsonRepresentation) error
func (*DAppClient) Render ¶
func (c *DAppClient) Render(jsxJson string) error
Click to show internal directories.
Click to hide internal directories.