maxwell

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: MIT Imports: 4 Imported by: 0

README

maxwell

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStore

type BlockStore interface {
	Put(height uint64, block []byte) error
	Get(height uint64) ([]byte, bool)
}

BlockStore blockchain block store service

type Consensus

type Consensus interface {
	GrpcHandle(server *grpc.Server) error // Consensus must implement mxwservice.Service
}

Consensus consensus algorithm service

type Peer

type Peer struct {
	ID    string                // peer id
	Addrs []multiaddr.Multiaddr // peer listen address
}

Peer blockchain peer info

type Transport

type Transport interface {
	// get self peer object
	ID() string
	// get detected peers
	PeerIDs() []string
	// get peer by peer id
	Peer(id string) Peer
	// add peer
	AddPeer(peer Peer)
	// remove peer by id
	RemovePeer(id string)
	//
	Listener() net.Listener
	//
	Connect(ctx context.Context, remote string) (net.Conn, error)
}

Transport the maxwell transport protocol

Jump to

Keyboard shortcuts

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