Documentation
¶
Index ¶
- func SetupRoutingManager(lifecycle fx.Lifecycle, logger *zerolog.Logger, ...) error
- type BadConfigError
- type DefaultRoutingTableManager
- func (r *DefaultRoutingTableManager) AddRoute(ctx context.Context, routeConfig *route.Config) error
- func (r *DefaultRoutingTableManager) GetAllFiltersStatus(ctx context.Context) (map[string]plugin.FilterStatus, error)
- func (r *DefaultRoutingTableManager) GetAllReceiversStatus(ctx context.Context) (map[string]plugin.ReceiverStatus, error)
- func (r *DefaultRoutingTableManager) GetAllRegisteredRoutes() ([]route.Config, error)
- func (r *DefaultRoutingTableManager) GetAllRoutes(ctx context.Context) ([]route.Config, error)
- func (r *DefaultRoutingTableManager) GetAllSendersStatus(ctx context.Context) (map[string]plugin.SenderStatus, error)
- func (r *DefaultRoutingTableManager) GetAllTenantRoutes(ctx context.Context, tenantId tenant.Id) ([]route.Config, error)
- func (r *DefaultRoutingTableManager) GetRoute(ctx context.Context, tid tenant.Id, routeId string) (*route.Config, error)
- func (r *DefaultRoutingTableManager) IsSynchronized() (bool, error)
- func (r *DefaultRoutingTableManager) RegisterAllRoutes() error
- func (r *DefaultRoutingTableManager) RemoveRoute(ctx context.Context, tid tenant.Id, routeId string) error
- func (r *DefaultRoutingTableManager) StartGlobalSyncChecker()
- func (r *DefaultRoutingTableManager) SyncItem(ctx context.Context, tid tenant.Id, routeId string, add bool) error
- func (r *DefaultRoutingTableManager) SynchronizeAllRoutes() (int, error)
- func (r *DefaultRoutingTableManager) UnregisterAllRoutes() error
- type InternalStorageError
- type LiveRouteWrapper
- func (lrw *LiveRouteWrapper) AddRouteReference() int
- func (lrw *LiveRouteWrapper) GetReferenceCount() int
- func (lrw *LiveRouteWrapper) Register(ctx context.Context, r *DefaultRoutingTableManager) error
- func (lrw *LiveRouteWrapper) RemoveRouteReference() int
- func (lrw *LiveRouteWrapper) Unregister(ctx context.Context, r *DefaultRoutingTableManager) error
- type RouteNotFoundError
- type RouteRegistrationError
- type RouteValidationError
- type RoutingTableGlobalSyncer
- type RoutingTableManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupRoutingManager ¶
Types ¶
type BadConfigError ¶ added in v0.2.1
type BadConfigError struct {
Wrapped error
}
func (*BadConfigError) Error ¶ added in v0.2.1
func (e *BadConfigError) Error() string
type DefaultRoutingTableManager ¶
func (*DefaultRoutingTableManager) GetAllFiltersStatus ¶ added in v0.2.1
func (r *DefaultRoutingTableManager) GetAllFiltersStatus(ctx context.Context) (map[string]plugin.FilterStatus, error)
func (*DefaultRoutingTableManager) GetAllReceiversStatus ¶ added in v0.2.1
func (r *DefaultRoutingTableManager) GetAllReceiversStatus(ctx context.Context) (map[string]plugin.ReceiverStatus, error)
func (*DefaultRoutingTableManager) GetAllRegisteredRoutes ¶
func (r *DefaultRoutingTableManager) GetAllRegisteredRoutes() ([]route.Config, error)
func (*DefaultRoutingTableManager) GetAllRoutes ¶
func (*DefaultRoutingTableManager) GetAllSendersStatus ¶ added in v0.2.1
func (r *DefaultRoutingTableManager) GetAllSendersStatus(ctx context.Context) (map[string]plugin.SenderStatus, error)
func (*DefaultRoutingTableManager) GetAllTenantRoutes ¶
func (*DefaultRoutingTableManager) IsSynchronized ¶
func (r *DefaultRoutingTableManager) IsSynchronized() (bool, error)
func (*DefaultRoutingTableManager) RegisterAllRoutes ¶
func (r *DefaultRoutingTableManager) RegisterAllRoutes() error
func (*DefaultRoutingTableManager) RemoveRoute ¶
func (*DefaultRoutingTableManager) StartGlobalSyncChecker ¶
func (r *DefaultRoutingTableManager) StartGlobalSyncChecker()
func (*DefaultRoutingTableManager) SynchronizeAllRoutes ¶
func (r *DefaultRoutingTableManager) SynchronizeAllRoutes() (int, error)
func (*DefaultRoutingTableManager) UnregisterAllRoutes ¶
func (r *DefaultRoutingTableManager) UnregisterAllRoutes() error
type InternalStorageError ¶ added in v0.2.1
type InternalStorageError struct {
Wrapped error
}
func (*InternalStorageError) Error ¶ added in v0.2.1
func (e *InternalStorageError) Error() string
type LiveRouteWrapper ¶
type LiveRouteWrapper struct {
sync.Mutex
Route *route.Route
Sender sender.Sender
Receiver receiver.Receiver
FilterChain *filter.Chain
Config route.Config
RefCnt int
}
func NewLiveRouteWrapper ¶
func NewLiveRouteWrapper(routeConfig route.Config) *LiveRouteWrapper
func (*LiveRouteWrapper) AddRouteReference ¶
func (lrw *LiveRouteWrapper) AddRouteReference() int
func (*LiveRouteWrapper) GetReferenceCount ¶
func (lrw *LiveRouteWrapper) GetReferenceCount() int
func (*LiveRouteWrapper) Register ¶
func (lrw *LiveRouteWrapper) Register(ctx context.Context, r *DefaultRoutingTableManager) error
func (*LiveRouteWrapper) RemoveRouteReference ¶
func (lrw *LiveRouteWrapper) RemoveRouteReference() int
func (*LiveRouteWrapper) Unregister ¶
func (lrw *LiveRouteWrapper) Unregister(ctx context.Context, r *DefaultRoutingTableManager) error
type RouteNotFoundError ¶ added in v0.2.1
type RouteNotFoundError struct {
Id string
}
func (*RouteNotFoundError) Error ¶ added in v0.2.1
func (e *RouteNotFoundError) Error() string
type RouteRegistrationError ¶ added in v0.2.1
type RouteRegistrationError struct {
Wrapped error
}
func (*RouteRegistrationError) Error ¶ added in v0.2.1
func (e *RouteRegistrationError) Error() string
type RouteValidationError ¶ added in v0.2.1
type RouteValidationError struct {
Wrapped error
}
func (*RouteValidationError) Error ¶ added in v0.2.1
func (e *RouteValidationError) Error() string
type RoutingTableGlobalSyncer ¶
type RoutingTableGlobalSyncer interface {
// StartGlobalSyncChecker
StartGlobalSyncChecker()
// RegisterAllRoutes
RegisterAllRoutes() error
// UnregisterAllRoutes
UnregisterAllRoutes() error
// SynchronizeAllRoutes
SynchronizeAllRoutes() (int, error)
// IsSynchronized
IsSynchronized() (bool, error)
// GetAllRegisteredRoutes gets all routes that are currently registered and running on ears instance
GetAllRegisteredRoutes() ([]route.Config, error)
}
type RoutingTableManager ¶
type RoutingTableManager interface {
RoutingTableGlobalSyncer // routing table manager delegates to routing table global syncer for startup and tear down
syncer.LocalSyncer // to sync routing table upon receipt of an update notification for a single route
// AddRoute adds a route to live routing table and runs it and also stores the route in the persistence layer
AddRoute(ctx context.Context, route *route.Config) error
// RemoveRoute removes a route from a live routing table and stops it and also removes the route from the persistence layer
RemoveRoute(ctx context.Context, tenantId tenant.Id, routeId string) error
// GetRoute gets a single route by its ID from persistence layer
GetRoute(ctx context.Context, tenantId tenant.Id, routeId string) (*route.Config, error)
// GetAllTenantRoutes gets all routes for a tenant from persistence layer
GetAllTenantRoutes(ctx context.Context, tenantId tenant.Id) ([]route.Config, error)
// GetAllRoutes gets all routes from persistence layer
GetAllRoutes(ctx context.Context) ([]route.Config, error)
// GetAllSenders gets all senders currently present in the system
GetAllSendersStatus(ctx context.Context) (map[string]plugin.SenderStatus, error)
// GetAllReceivers gets all receivers currently present in the system
GetAllReceiversStatus(ctx context.Context) (map[string]plugin.ReceiverStatus, error)
// GetAllFilters gets all filters currently present in the system
GetAllFiltersStatus(ctx context.Context) (map[string]plugin.FilterStatus, error)
}
A RoutingTableManager supports modifying and querying an EARS routing table
func NewRoutingTableManager ¶
func NewRoutingTableManager(pluginMgr plugin.Manager, storageMgr route.RouteStorer, tableSyncer syncer.DeltaSyncer, logger *zerolog.Logger, config config.Config) RoutingTableManager
Click to show internal directories.
Click to hide internal directories.