inet256client

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: GPL-3.0, MPL-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const DefaultAPIEndpoint = "http://127.0.0.1:2560/nodes/"

Variables

This section is empty.

Functions

func NewClient

func NewClient(endpoint string) (inet256.Service, error)

NewClient creates an INET256 service using the specified endpoint for the API.

func NewEnvClient

func NewEnvClient() (inet256.Service, error)

NewEnvClient creates an INET256 service using the environment variables to find the API. If you are looking for a inet256.Service constructor, this is probably the one you want. It checks the environment variable `INET256_API`

func NewPacketConn

func NewPacketConn(n inet256.Node) net.PacketConn

NewPacketConn wraps the Node n in an adapter exposing the net.PacketConn interface instead.

func NewSwarm

func NewSwarm(node inet256.Node) p2p.SecureSwarm[inet256.Addr]

NewSwarm creates a p2p.SecureSwarm from an inet256.Node.

func NewTestService

func NewTestService(t testing.TB) inet256.Service

NewTestService can be used to spawn an inet256 service without any peering for use in tests

Types

type Addr added in v0.0.3

type Addr = inet256.Addr

type ID added in v0.0.3

type ID = inet256.ID

Jump to

Keyboard shortcuts

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