router

package
v1.11.14 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package router provides networking router functionality

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler added in v1.11.14

type Handler interface {
	Handle(msg Message) error
}

Handler processes messages

type Message added in v1.11.14

type Message interface {
	Type() string
	Payload() []byte
}

Message represents a network message

type Router

type Router interface {
	// Route sends a message to the appropriate handler
	Route(msg Message) error

	// RegisterHandler registers a message handler
	RegisterHandler(msgType string, handler Handler) error
}

Router handles network message routing

Jump to

Keyboard shortcuts

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