moderator

package
v0.3.107 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientNodeStreamer

type ClientNodeStreamer interface {
	ClientStream(nodeId string, path string, data any) (_ []byte, err error)
}

type DiscoveryHandler

type DiscoveryHandler interface {
	HandlePeerFound(pi warpnet.WarpAddrInfo)
	Run(n discovery.DiscoveryInfoStorer) error
	Close()
}

type DistributedHashTableCloser

type DistributedHashTableCloser interface {
	Close()
}

type DistributedStorer

type DistributedStorer interface {
	GetStream(ctx context.Context, id string) (io.ReadCloser, error)
	PutStream(ctx context.Context, reader io.ReadCloser) (id string, _ error)
}

type ModeratorNode

type ModeratorNode struct {
	*base.WarpNode
	// contains filtered or unexported fields
}

func NewModeratorNode

func NewModeratorNode(
	ctx context.Context,
	privKey ed25519.PrivateKey,
	psk security.PSK,
	store DistributedStorer,
	selfHashHex string,
) (_ *ModeratorNode, err error)

func (*ModeratorNode) GenericStream

func (bn *ModeratorNode) GenericStream(nodeIdStr string, path stream.WarpRoute, data any) (_ []byte, err error)

func (*ModeratorNode) NodeInfo

func (bn *ModeratorNode) NodeInfo() warpnet.NodeInfo

func (*ModeratorNode) Start

func (bn *ModeratorNode) Start() error

func (*ModeratorNode) Stop

func (bn *ModeratorNode) Stop()

type ProviderCloser

type ProviderCloser interface {
	io.Closer
}

type PubSubProvider

type PubSubProvider interface {
	Run(m pubsub.PubsubServerNodeConnector, clientNode pubsub.PubsubClientNodeStreamer)
	PublishUpdateToFollowers(ownerId string, msg event.Message) (err error)
	Close() error
}

Jump to

Keyboard shortcuts

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