memswarm

package
v0.0.0-...-d4b7e32 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MPL-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr struct {
	N int
}

func ParseAddr

func ParseAddr(x []byte) (ret Addr, _ error)

func (Addr) Key

func (a Addr) Key() string

func (Addr) MarshalText

func (a Addr) MarshalText() ([]byte, error)

func (Addr) String

func (a Addr) String() string

type Message

type Message = p2p.Message[Addr]

type Option

type Option = vswarm.Option[Addr]

func WithMTU

func WithMTU(n int) Option

func WithQueueLen

func WithQueueLen(n int) Option

func WithTellTransform

func WithTellTransform(tf func(*Message) bool) Option

type Realm

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

func NewRealm

func NewRealm(opts ...Option) *Realm

func (*Realm) NewSwarm

func (r *Realm) NewSwarm() *vswarm.Swarm[Addr]

type SecureRealm

type SecureRealm[Pub any] struct {
	// contains filtered or unexported fields
}

func NewSecureRealm

func NewSecureRealm[Pub any](opts ...Option) *SecureRealm[Pub]

func (*SecureRealm[Pub]) NewSwarm

func (sr *SecureRealm[Pub]) NewSwarm(pub Pub) *vswarm.SecureSwarm[Addr, Pub]

Jump to

Keyboard shortcuts

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