base

package
v0.76.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NexusBase added in v0.54.0

type NexusBase struct {
	BelowNexus *nexus.Nexus
	Layer      layer.Base
	// contains filtered or unexported fields
}

NexusBase is the nexus superclass. It contains common functions for a nexus.

func NewBaseNexus

func NewBaseNexus(name string) *NexusBase

NewBaseNexus creates a new nexus base.

func NewBaseNexusBelow

func NewBaseNexusBelow(name string, belowNexus nexus.Nexus) *NexusBase

NewBaseNexusBelow creates a new base nexus and sets the below nexus.

func NewBaseNexusFull

func NewBaseNexusFull(name string, belowNexus nexus.Nexus, layer layer.Base) NexusBase

NewBaseNexusFull creates a new base nexus and sets a below nexus/layer for comms.

func (*NexusBase) CheckCrossedNexus added in v0.54.0

func (b *NexusBase) CheckCrossedNexus(belowNexus nexus.Nexus)

CheckCrossedNexus checks if the nexus has been crossed.

func (NexusBase) GetDownwardNexusList added in v0.54.0

func (b NexusBase) GetDownwardNexusList() (belowList []nexus.Nexus)

GetDownwardNexusList gets the nexus list.

func (*NexusBase) InitiateClose added in v0.54.0

func (b *NexusBase) InitiateClose()

InitiateClose closes the websocket.

func (*NexusBase) IsEqual added in v0.54.0

func (b *NexusBase) IsEqual(n nexus.Nexus) bool

IsEqual checks if a nexus is equal to another nexus.

func (*NexusBase) Name added in v0.54.0

func (b *NexusBase) Name() string

Name gets the name of the nexus.

func (*NexusBase) OnBinMessage added in v0.54.0

func (b *NexusBase) OnBinMessage(belowNexus nexus.Nexus, msg []byte)

OnBinMessage calls the binary message method.

func (*NexusBase) OnMessage added in v0.54.0

func (b *NexusBase) OnMessage(belowNexus nexus.Nexus, msg base.MoneysocketMessage)

OnMessage handles the message callback.

func (*NexusBase) Send added in v0.54.0

func (b *NexusBase) Send(msg base.MoneysocketMessage) error

Send sends a message.

func (*NexusBase) SendBin added in v0.54.0

func (b *NexusBase) SendBin(msg []byte) error

SendBin sends a binary message.

func (*NexusBase) SetOnBinMessage added in v0.54.0

func (b *NexusBase) SetOnBinMessage(messageBinFunc nexus.OnBinMessage)

SetOnBinMessage sets the binary message callback function.

func (*NexusBase) SetOnMessage added in v0.54.0

func (b *NexusBase) SetOnMessage(messageFunc nexus.OnMessage)

SetOnMessage sets the message callback function.

func (NexusBase) SharedSeed added in v0.54.0

func (b NexusBase) SharedSeed() *beacon.SharedSeed

SharedSeed gets the shared seed.

func (*NexusBase) UUID added in v0.54.0

func (b *NexusBase) UUID() uuid.UUID

UUID gets the uuid of the nexus base.

Jump to

Keyboard shortcuts

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