serve

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByRangeCmd

type ByRangeCmd struct {
	*base.Base

	Blocks bdb.DB
	Chain  chain.FullChain

	Timeout     time.Duration         `ask:"--timeout" help:"Timeout for full request and response. 0 to disable"`
	Compression flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`

	MaxCount uint64 `ask:"--max-count" help:"Max count param in range requests"`
	MaxStep  uint64 `ask:"--max-step" help:"Max step param in range requests"`
}

func (*ByRangeCmd) Default

func (c *ByRangeCmd) Default()

func (*ByRangeCmd) Help

func (c *ByRangeCmd) Help() string

func (*ByRangeCmd) Run

func (c *ByRangeCmd) Run(ctx context.Context, args ...string) error

type ByRootCmd

type ByRootCmd struct {
	*base.Base

	Blocks bdb.DB
	Chain  chain.FullChain

	Timeout     time.Duration         `ask:"--timeout" help:"Timeout for full request and response. 0 to disable"`
	Compression flags.CompressionFlag `ask:"--compression" help:"Compression. 'none' to disable, 'snappy' for streaming-snappy"`

	MaxCount   uint64 `ask:"--max-count" help:"Max amount of roots to accept requests of"`
	WithinView bool   `ask:"--within-view" help:"Only allow requests for blocks within view of chain. I.e. either canon cold, or any hot block."`
}

func (*ByRootCmd) Default

func (c *ByRootCmd) Default()

func (*ByRootCmd) Help

func (c *ByRootCmd) Help() string

func (*ByRootCmd) Run

func (c *ByRootCmd) Run(ctx context.Context, args ...string) error

type ServeCmd

type ServeCmd struct {
	*base.Base
	Chain  chain.FullChain
	Blocks bdb.DB
}

func (*ServeCmd) Cmd

func (c *ServeCmd) Cmd(route string) (cmd interface{}, err error)

func (*ServeCmd) Help

func (c *ServeCmd) Help() string

func (*ServeCmd) Routes

func (c *ServeCmd) Routes() []string

Jump to

Keyboard shortcuts

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