client

package
v0.0.0-...-ecaa456 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RetryPolicy = `` /* 283-byte string literal not displayed */

)

Functions

This section is empty.

Types

type Client

type Client struct {
	Node Node

	// server part
	Port int

	drpc.UnimplementedDServerServer
	// contains filtered or unexported fields
}

func (*Client) BroadcastBlock

func (c *Client) BroadcastBlock(ctx context.Context, e *drpc.DBlock) (*drpc.DEmpty, error)

func (*Client) GetLocalBlock

func (c *Client) GetLocalBlock(ctx context.Context, e *drpc.DEmpty) (*drpc.DBlocks, error)

grpc methods

func (*Client) Init

func (c *Client) Init(node Node, addr string, port int) error

func (*Client) Update

func (c *Client) Update(id, successor, d string)

type Node

type Node interface {
	BroadCast(string) error
	GetLocalBlocks() []mock.Block
	GetID() string
}

Jump to

Keyboard shortcuts

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