net

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// MaxPullLimit is the maximum page size for pulling records.
	MaxPullLimit = 10000

	// InitialPullInterval is the interval between automatic log pulls.
	InitialPullInterval = time.Second

	// PullInterval is the interval between automatic log pulls.
	PullInterval = time.Second * 10
)

Functions

func NewNetwork

func NewNetwork(ctx context.Context, h host.Host, bstore bs.Blockstore, ds format.DAGService, ls lstore.Logstore, conf Config, opts ...grpc.ServerOption) (core.Net, error)

NewNetwork creates an instance of net from the given host and thread store.

func NewRecord

func NewRecord(r core.Record, id thread.ID, lid peer.ID) core.ThreadRecord

NewRecord returns a record with the given values.

Types

type Config

type Config struct {
	Debug bool
}

Config is used to specify thread instance options.

type Record

type Record struct {
	core.Record
	// contains filtered or unexported fields
}

Record wraps a core.Record within a thread and log context.

func (*Record) LogID

func (r *Record) LogID() peer.ID

LogID returns the record's log ID.

func (*Record) ThreadID

func (r *Record) ThreadID() thread.ID

ThreadID returns the record's thread ID.

func (*Record) Value

func (r *Record) Value() core.Record

Value returns the underlying record.

Directories

Path Synopsis
api
pb

Jump to

Keyboard shortcuts

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