Documentation
¶
Index ¶
- type Router
- func (r *Router) AddEventDestination(dest common.EventDestination)
- func (r *Router) GetRunningConfig() config.Config
- func (r *Router) HandleEvent(event common.Event, sender common.EventDestination)
- func (r *Router) HandleInput(ctx context.Context, sourceId string, payload any) (bool, []common.RouteIOError)
- func (r *Router) HandleOutput(ctx context.Context, destinationId string, payload any) error
- func (r *Router) RemoveEventDestination(dest common.EventDestination)
- func (r *Router) Start(ctx context.Context)
- func (r *Router) Stop()
- func (r *Router) UpdateConfig(newConfig config.Config, triggerChangeChan bool) (error, []config.ModuleError, []config.RouteError)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct {
Context context.Context
// TODO(jwetzell): do these need to be guarded against concurrency?
ModuleInstances map[string]common.Module
// TODO(jwetzell): change to something easier to lookup
RouteInstances []*route.Route
ConfigChange chan config.Config
// contains filtered or unexported fields
}
TODO(jwetzell): can/should this be split into different "components"?
func NewRouter ¶
func NewRouter(routerConfig config.Config) (*Router, []config.ModuleError, []config.RouteError)
func (*Router) AddEventDestination ¶ added in v0.19.2
func (r *Router) AddEventDestination(dest common.EventDestination)
func (*Router) GetRunningConfig ¶ added in v0.19.2
func (*Router) HandleEvent ¶ added in v0.19.2
func (r *Router) HandleEvent(event common.Event, sender common.EventDestination)
func (*Router) HandleInput ¶
func (*Router) HandleOutput ¶
func (*Router) RemoveEventDestination ¶ added in v0.19.2
func (r *Router) RemoveEventDestination(dest common.EventDestination)
func (*Router) UpdateConfig ¶ added in v0.16.0
func (r *Router) UpdateConfig(newConfig config.Config, triggerChangeChan bool) (error, []config.ModuleError, []config.RouteError)
Click to show internal directories.
Click to hide internal directories.