blockstream

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 17 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

func NewBufferedServer

func NewBufferedServer(server *grpc.Server, size int) *Server

func NewServer

func NewServer(server *grpc.Server) *Server

func (*Server) Blocks

func (*Server) Close

func (s *Server) Close()

func (*Server) GetHeadInfo

func (*Server) PushBlock

func (s *Server) PushBlock(blk *bstream.Block) error

func (*Server) Ready

func (s *Server) Ready() bool

func (*Server) Serve

func (s *Server) Serve(listener net.Listener) error

func (*Server) SetHeadInfo

func (s *Server) SetHeadInfo(num uint64, id string, blkTime time.Time, libNum uint64)

type Source

type Source struct {
	*shutter.Shutter
	// contains filtered or unexported fields
}

func NewSource

func NewSource(
	ctx context.Context,
	endpointURL string,
	burst int64,
	h bstream.Handler,
	options ...SourceOption,
) *Source

func (*Source) Run

func (s *Source) Run()

func (*Source) SetName

func (s *Source) SetName(name string)

func (*Source) SetParallelPreproc

func (s *Source) SetParallelPreproc(f bstream.PreprocessFunc, threads int)

type SourceOption

type SourceOption = func(s *Source)

func WithName

func WithName(name string) SourceOption

func WithNumGator

func WithNumGator(blockNum uint64, exclusive bool) SourceOption

func WithParallelPreproc

func WithParallelPreproc(f bstream.PreprocessFunc, threads int) SourceOption

func WithTimeThresholdGator

func WithTimeThresholdGator(threshold time.Duration) SourceOption

Jump to

Keyboard shortcuts

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