kord

package
v0.0.0-...-97177e4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2018 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	HTTPAddr: "localhost",
	HTTPPort: 5000,
}

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(url string) (*Client, error)

func (*Client) CommitGraph

func (c *Client) CommitGraph(ctx context.Context, id string) (common.Hash, error)

func (*Client) CreateGraph

func (c *Client) CreateGraph(ctx context.Context, id string) (common.Hash, error)

func (*Client) QuadStore

func (c *Client) QuadStore(name string) graph.QuadStore

func (*Client) SetGraph

func (c *Client) SetGraph(ctx context.Context, hash common.Hash, sig []byte) error

func (*Client) SetRootDapp

func (c *Client) SetRootDapp(ctx context.Context, uri string) error

type Config

type Config struct {
	HTTPAddr    string
	HTTPPort    int
	RootDapp    string
	CORSDomains []string
}

type Kord

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

func New

func New(ctx *node.ServiceContext, stack *node.Node, cfg *Config) (*Kord, error)

func (*Kord) APIs

func (m *Kord) APIs() []rpc.API

func (*Kord) Protocols

func (m *Kord) Protocols() []p2p.Protocol

func (*Kord) Start

func (m *Kord) Start(_ *p2p.Server) error

func (*Kord) Stop

func (m *Kord) Stop() error

type PublicAPI

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

func NewPublicAPI

func NewPublicAPI(kord *Kord) *PublicAPI

func (*PublicAPI) ApplyDeltas

func (api *PublicAPI) ApplyDeltas(name string, in []graph.Delta, opts graph.IgnoreOpts) (common.Hash, error)

func (*PublicAPI) CommitGraph

func (api *PublicAPI) CommitGraph(name string) (common.Hash, error)

func (*PublicAPI) CreateGraph

func (api *PublicAPI) CreateGraph(name string) (common.Hash, error)

func (*PublicAPI) HttpAddr

func (api *PublicAPI) HttpAddr() string

func (*PublicAPI) SetGraph

func (api *PublicAPI) SetGraph(hash common.Hash, sig []byte) error

func (*PublicAPI) SetRootDapp

func (api *PublicAPI) SetRootDapp(dappURI string) error

type Server

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

func NewServer

func NewServer(api *api.API, swarm *swarmapi.Api) *Server

func (*Server) ServeDapp

func (s *Server) ServeDapp(w http.ResponseWriter, r *http.Request)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL