client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	URL    string
	Chain  string
	Client *http.Client
}

func (*Client) GetBlock

func (c *Client) GetBlock(ctx context.Context, blockID string) (*model.Block, error)

func (*Client) GetBlockHeader

func (c *Client) GetBlockHeader(ctx context.Context, blockID string) (*model.BlockHeader, error)

func (*Client) GetBlockOperations

func (c *Client) GetBlockOperations(ctx context.Context, blockID string) (model.BlockOperations, error)

func (*Client) GetMinimalValidTime

func (c *Client) GetMinimalValidTime(ctx context.Context, blockID string, priority, power int) (time.Time, error)

func (*Client) GetMonitorHeads

func (c *Client) GetMonitorHeads(ctx context.Context) (headerCh <-chan *model.ShellBlockHeader, errorsCh <-chan error, err error)

func (*Client) GetProtocolConstants

func (c *Client) GetProtocolConstants(ctx context.Context) (*model.ProtocolConstants, error)

func (*Client) NewGetBlockHeaderRequest

func (c *Client) NewGetBlockHeaderRequest(ctx context.Context, blockID string) (*http.Request, error)

func (*Client) NewGetBlockOperationsRequest

func (c *Client) NewGetBlockOperationsRequest(ctx context.Context, blockID string) (*http.Request, error)

func (*Client) NewGetBlockRequest

func (c *Client) NewGetBlockRequest(ctx context.Context, blockID string) (*http.Request, error)

func (*Client) NewGetMinimalValidTimeRequest

func (c *Client) NewGetMinimalValidTimeRequest(ctx context.Context, blockID string, priority, power int) (*http.Request, error)

func (*Client) NewGetMonitorHeadsRequest

func (c *Client) NewGetMonitorHeadsRequest(ctx context.Context) (*http.Request, error)

func (*Client) NewGetProtocolConstantsRequest

func (c *Client) NewGetProtocolConstantsRequest(ctx context.Context) (*http.Request, error)

type HTTPError

type HTTPError struct {
	StatusCode int
	Status     string
	Body       []byte
}

func (*HTTPError) Error

func (h *HTTPError) Error() string

Jump to

Keyboard shortcuts

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