service

package
v0.1.11-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 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 NewRecord added in v0.1.6

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

NewRecord returns a record with the given values.

func NewService

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

NewService creates an instance of service from the given host and thread store.

Types

type Config

type Config struct {
	Debug bool
}

Config is used to specify thread instance options.

type Record added in v0.1.6

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

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

func (*Record) LogID added in v0.1.6

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

LogID returns the record's log ID.

func (*Record) ThreadID added in v0.1.6

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

ThreadID returns the record's thread ID.

func (*Record) Value added in v0.1.6

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