router

package
v0.0.0-...-f069fcf Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Single    = "single"
	Multicast = "multicast"
	Broadcast = "broadcast"
	Official  = "official"
	Random    = "random"
)

Functions

This section is empty.

Types

type RouteMethod

type RouteMethod interface {
	Single([]string) []port.Port
	Multicast([]string) []port.Port
	Broadcast([]string) []port.Port
	Official([]string) []port.Port
	Random([]string) []port.Port
}

type Router

type Router interface {
	internal.Launcher

	Add(p port.Port)

	Adds(p []port.Port)

	Route(ibtp *pb.Message) error

	Load(key string) (value port.Port, ok bool)

	Send(id string, msg *pb.Message) (*pb.Message, error)

	AsyncSend(id string, msg *pb.Message) error
}

func NewRouter

func NewRouter(config *repo.Config, privateKey crypto.PrivateKey, logger logrus.FieldLogger, checker checker.Checker) Router

Directories

Path Synopsis
Package mock_router is a generated GoMock package.
Package mock_router is a generated GoMock package.

Jump to

Keyboard shortcuts

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