server

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InternalServer

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

InternalServer is handle to internal http server

func NewInternalServer

func NewInternalServer(httpServerBinding string, certFiles string, db *db.RocksDB, chain bchain.BlockChain, txCache *db.TxCache, is *common.InternalState) (*InternalServer, error)

NewInternalServer creates new internal http interface to blockbook and returns its handle

func (*InternalServer) Close

func (s *InternalServer) Close() error

Close closes the server

func (*InternalServer) Run

func (s *InternalServer) Run() error

Run starts the server

func (*InternalServer) Shutdown

func (s *InternalServer) Shutdown(ctx context.Context) error

Shutdown shuts down the server

type PublicServer

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

PublicServer is handle to public http server

func NewPublicServer

func NewPublicServer(binding string, certFiles string, db *db.RocksDB, chain bchain.BlockChain, txCache *db.TxCache, explorerURL string, metrics *common.Metrics, is *common.InternalState) (*PublicServer, error)

NewPublicServerS creates new public server http interface to blockbook and returns its handle

func (*PublicServer) Close

func (s *PublicServer) Close() error

Close closes the server

func (*PublicServer) OnNewBlock

func (s *PublicServer) OnNewBlock(hash string, height uint32)

OnNewBlock notifies users subscribed to bitcoind/hashblock about new block

func (*PublicServer) OnNewTxAddr

func (s *PublicServer) OnNewTxAddr(txid string, addr string, isOutput bool)

OnNewTxAddr notifies users subscribed to bitcoind/addresstxid about new block

func (*PublicServer) Run

func (s *PublicServer) Run() error

Run starts the server

func (*PublicServer) Shutdown

func (s *PublicServer) Shutdown(ctx context.Context) error

Shutdown shuts down the server

type SocketIoServer

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

SocketIoServer is handle to SocketIoServer

func NewSocketIoServer

func NewSocketIoServer(db *db.RocksDB, chain bchain.BlockChain, txCache *db.TxCache, metrics *common.Metrics, is *common.InternalState) (*SocketIoServer, error)

NewSocketIoServer creates new SocketIo interface to blockbook and returns its handle

func (*SocketIoServer) GetHandler

func (s *SocketIoServer) GetHandler() http.Handler

GetHandler returns socket.io http handler

func (*SocketIoServer) OnNewBlockHash

func (s *SocketIoServer) OnNewBlockHash(hash string)

OnNewBlockHash notifies users subscribed to bitcoind/hashblock about new block

func (*SocketIoServer) OnNewTxAddr

func (s *SocketIoServer) OnNewTxAddr(txid string, addr string, isOutput bool)

OnNewTxAddr notifies users subscribed to bitcoind/addresstxid about new block

type TemplateData

type TemplateData struct {
	CoinName     string
	CoinShortcut string
	Address      *api.Address
	AddrStr      string
	Tx           *api.Tx
}

Jump to

Keyboard shortcuts

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