Documentation ¶
Overview ¶
Package router providers a default implement of `router` and `Route`.
Package router defines the interface of router and route.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultRouter ¶
type DefaultRouter struct {
// contains filtered or unexported fields
}
DefaultRouter providers a default implement of `router`, It route the data according to observed tag or connID.
type Route ¶
type Route interface { // Add a route. Add(connID string, observeDataTags []frame.Tag) error // Remove a route. Remove(connID string) error // GetForwardRoutes returns all the subscribers by the given data tag. GetForwardRoutes(tag frame.Tag) (connIDs []string) }
Route manages data subscribers according to their observed data tags.
Click to show internal directories.
Click to hide internal directories.