local

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IncomingLocalLayer

type IncomingLocalLayer struct {
	layer.BaseLayer
}

IncomingLocalLayer is the incoming local layer.

func NewIncomingLocalLayer

func NewIncomingLocalLayer() *IncomingLocalLayer

NewIncomingLocalLayer creates a new incoming local layer.

func (*IncomingLocalLayer) AnnounceNexus

func (i *IncomingLocalLayer) AnnounceNexus(belowNexus nexus.Nexus)

AnnounceNexus creates a new LocalNexus and registers it.

func (*IncomingLocalLayer) RegisterAboveLayer

func (i *IncomingLocalLayer) RegisterAboveLayer(belowLayer layer.Base)

RegisterAboveLayer registers the current nexuses announce/revoke nexuses to the below layer.

type OutgoingLocalLayer

type OutgoingLocalLayer struct {
	layer.BaseLayer
	// IncomingLocalLayer processes incoming websockets
	IncomingLocalLayer layer.Base
	// OutgoingBySharedSeed manages outgoing nexuses keyed by shared seed
	OutgoingBySharedSeed map[string]nexus.Nexus
	// IncomingBySharedSeed manages incoming nexuses keyed by shared seed
	IncomingBySharedSeed map[string]nexus.Nexus
}

OutgoingLocalLayer handles websocket connections.

func NewOutgoingLocalLayer

func NewOutgoingLocalLayer() OutgoingLocalLayer

NewOutgoingLocalLayer creates a new OutgoingLocalLayer.

func (*OutgoingLocalLayer) AnnounceNexus

func (o *OutgoingLocalLayer) AnnounceNexus(belowNexus nexus.Nexus)

AnnounceNexus creates a new local.LocalNexus and registers it.

func (*OutgoingLocalLayer) Connect

func (o *OutgoingLocalLayer) Connect(sharedSeed beacon.SharedSeed)

Connect connects an incoming and outgoing nexus.

func (*OutgoingLocalLayer) Disconnect

func (o *OutgoingLocalLayer) Disconnect(sharedSeed beacon.SharedSeed)

Disconnect revokes incoming/outgoing connection.

func (*OutgoingLocalLayer) RegisterAboveLayer

func (o *OutgoingLocalLayer) RegisterAboveLayer(belowLayer layer.Base)

RegisterAboveLayer registers the current nexuses announce/revoke nexuses to the below layer.

func (*OutgoingLocalLayer) SetIncomingLayer

func (o *OutgoingLocalLayer) SetIncomingLayer(incomingLayer layer.Base)

SetIncomingLayer sets the incoming layer to pass messages to.

Jump to

Keyboard shortcuts

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