common

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 5MiB max entry size
	MaxEntrySize   = 1024 * 1024 * 4
	MaxMessageSize = 1024 * 1024 * 5

	// This is the decompressed size
	MaxMessageContentSize = MaxEntrySize
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Closable

type Closable interface {
	Close() error
}

type ConnectPeer

type ConnectPeer func(dht.Address) (interface{}, error)

type Encoder

type Encoder interface {
	Bytes() ([]byte, error)
	String() (string, error)

	// The latter two may be equivelant
	Encode() ([]byte, error)
	EncodeString() (string, error)
}

type Peer

type Peer interface {
	EAddress() Encoder
	FindClosest(dht.Address) ([]Verifier, error)
	Query(dht.Address) (Verifier, error)
}

type Signer

type Signer interface {
	Sign([]byte) []byte
	PublicKey() []byte
}

type Verifier

type Verifier interface {
	Verify() error
}

Jump to

Keyboard shortcuts

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