Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Id string `json:"id,omitempty"` // route ID TenantId tenant.Id `json:"tenant,omitempty"` // TenantId. Derived from URL path. Should not be marshaled UserId string `json:"userId,omitempty"` // user ID / author of route Name string `json:"name,omitempty"` // optional unique name for route Origin string `json:"origin,omitempty"` // optional reference to route owner, e.g. Flow ID in case of Gears Receiver PluginConfig `json:"receiver,omitempty"` // source plugin configuration Sender PluginConfig `json:"sender,omitempty"` // destination plugin configuration FilterChain []PluginConfig `json:"filterChain,omitempty"` // filter chain configuration DeliveryMode string `json:"deliveryMode,omitempty"` // possible values: fire_and_forget, at_least_once, exactly_once Debug bool `json:"debug,omitempty"` // if true generate debug logs and metrics for events taking this route Created int64 `json:"created,omitempty"` // time on when route was created, in unix timestamp seconds Modified int64 `json:"modified,omitempty"` // last time when route was modified, in unix timestamp seconds }
type InvalidRouteError ¶
type InvalidRouteError struct {
Err error
}
func (*InvalidRouteError) Error ¶
func (e *InvalidRouteError) Error() string
func (*InvalidRouteError) Unwrap ¶
func (e *InvalidRouteError) Unwrap() error
type PluginConfig ¶
type PluginConfig struct { Plugin string `json:"plugin,omitempty"` // plugin or filter type, e.g. kafka, kds, sqs, webhook, filter Name string `json:"name,omitempty"` // plugin label to allow multiple instances of otherwise identical plugin configurations Config interface{} `json:"config,omitempty"` // plugin specific configuration parameters }
type RouteNotFoundError ¶
func (*RouteNotFoundError) Error ¶
func (e *RouteNotFoundError) Error() string
type RouteStorer ¶
type RouteStorer interface { //Get all routes of all tenants GetAllRoutes(context.Context) ([]Config, error) //If route is not found, the function should return a item not found error GetRoute(context.Context, tenant.Id, string) (Config, error) GetAllTenantRoutes(ctx context.Context, id tenant.Id) ([]Config, error) //SetRoute will add the route if it new or update the route if //it is an existing one. It will also update the create time and //modified time of the route where appropriate. SetRoute(context.Context, Config) error SetRoutes(context.Context, []Config) error DeleteRoute(context.Context, tenant.Id, string) error DeleteRoutes(context.Context, tenant.Id, []string) error }
All route operations are synchronous. The storer should respect the cancellation from the context and cancel its operation gracefully when desired.
Click to show internal directories.
Click to hide internal directories.