Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorRouterNotFound = errors.New("Router not found.")
)
Functions ¶
func CreateRouterConfig ¶ added in v1.9.1
func CreateRouterConfig(strategy string, data []byte) (interface{}, error)
func RegisterRouter ¶
func RegisterRouter(name string, factory RouterFactory) error
func RegisterRouterConfig ¶ added in v1.9.1
func RegisterRouterConfig(strategy string, creator ConfigObjectCreator) error
Types ¶
type ConfigObjectCreator ¶ added in v1.9.1
type ConfigObjectCreator func([]byte) (interface{}, error)
type Router ¶
type Router interface {
TakeDetour(v2net.Destination) (string, error)
}
func CreateRouter ¶
func CreateRouter(name string, rawConfig interface{}) (Router, error)
type RouterFactory ¶
type RouterFactory interface {
Create(rawConfig interface{}) (Router, error)
}
Click to show internal directories.
Click to hide internal directories.