braid

package module
v0.0.0-...-888bb8d Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 10 Imported by: 0

README

braid

Braid is a protocol and data structure for distributed consensus

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity interface {
	// Equals returns true if and only if the Identities are equal.
	Equals(q Identity) bool
}

Identity is a public reference to a specific peer.

Identity is conceptually similar to a cryptographic public key and can be shared freely.

Identity is not validated or signed by any other authority and it is up to the application to determine if the peer presenting an Identity is trustworthy.

func RemoteIdentity

func RemoteIdentity(c net.Conn) (Identity, error)

type Secret

type Secret interface {
	// Identity returns the shareable Identity corresponding to this Secret.
	Identity() Identity
}

Secret is a private value used to act as an Identity.

Secret is conceptually similar to a cryptographic private key and should not be shared.

func NewIdentity

func NewIdentity() Secret

type Transport

type Transport struct {
	// contains filtered or unexported fields
}

func NewTransport

func NewTransport(s Secret) *Transport

func (*Transport) Dial

func (t *Transport) Dial(network, address string) (net.Conn, error)

func (*Transport) DialContext

func (t *Transport) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*Transport) Listen

func (t *Transport) Listen(network, address string) (net.Listener, error)

func (*Transport) ListenContext

func (t *Transport) ListenContext(ctx context.Context, network, address string) (net.Listener, error)

Directories

Path Synopsis
cmd
internal
pkg
ed25519
Package ed25519 is intended to force the use of ZIP215's precise validation criteria for Ed25519.
Package ed25519 is intended to force the use of ZIP215's precise validation criteria for Ed25519.

Jump to

Keyboard shortcuts

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