Documentation ¶
Index ¶
- Constants
- func MakeAdminComponentInstrumentingMW(h metrics.Histogram) func(AdminComponent) AdminComponent
- func MakeAdminComponentLoggingMW(log log.Logger) func(AdminComponent) AdminComponent
- func MakeAdminComponentTracingMW(tracer tracing.OpentracingClient) func(AdminComponent) AdminComponent
- func MakeComponentInstrumentingMW(h metrics.Histogram) func(Component) Component
- func MakeComponentLoggingMW(log log.Logger) func(Component) Component
- func MakeComponentTracingMW(tracer tracing.OpentracingClient) func(Component) Component
- func MakeConsoleModuleInstrumentingMW(h metrics.Histogram) func(ConsoleModule) ConsoleModule
- func MakeConsoleModuleLoggingMW(log log.Logger) func(ConsoleModule) ConsoleModule
- func MakeConsoleModuleTracingMW(tracer tracing.OpentracingClient) func(ConsoleModule) ConsoleModule
- func MakeEventEndpoint(c MuxComponent) cs.Endpoint
- func MakeEventsDBModuleInstrumentingMW(h metrics.Histogram) func(database.EventsDBModule) database.EventsDBModule
- func MakeEventsDBModuleLoggingMW(log log.Logger) func(database.EventsDBModule) database.EventsDBModule
- func MakeEventsDBModuleTracingMW(tracer tracing.OpentracingClient) func(database.EventsDBModule) database.EventsDBModule
- func MakeHTTPEventHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server
- func MakeMuxComponentInstrumentingMW(h metrics.Histogram) func(MuxComponent) MuxComponent
- func MakeMuxComponentLoggingMW(log log.Logger) func(MuxComponent) MuxComponent
- func MakeMuxComponentTracingMW(tracer tracing.OpentracingClient) func(MuxComponent) MuxComponent
- func MakeMuxComponentTrackingMW(sentry tracking.SentryTracking, logger log.Logger) func(MuxComponent) MuxComponent
- func MakeStatisticModuleInstrumentingMW(h metrics.Histogram) func(StatisticModule) StatisticModule
- func MakeStatisticModuleLoggingMW(log log.Logger) func(StatisticModule) StatisticModule
- func MakeStatisticModuleTracingMW(tracer tracing.OpentracingClient) func(StatisticModule) StatisticModule
- type AdminComponent
- type Component
- type ConsoleModule
- type Endpoints
- type ErrInvalidArgument
- type FuncEvent
- type Influx
- type KeycloakRequest
- type MuxComponent
- type Request
- type StatisticModule
Constants ¶
const (
// KeyCorrelationID is histogram field for correlation ID
KeyCorrelationID = "correlation_id"
)
Variables ¶
This section is empty.
Functions ¶
func MakeAdminComponentInstrumentingMW ¶
func MakeAdminComponentInstrumentingMW(h metrics.Histogram) func(AdminComponent) AdminComponent
MakeAdminComponentInstrumentingMW makes a Instrumenting middleware for the admin event component.
func MakeAdminComponentLoggingMW ¶
func MakeAdminComponentLoggingMW(log log.Logger) func(AdminComponent) AdminComponent
MakeAdminComponentLoggingMW makes a logging middleware for the admin event component.
func MakeAdminComponentTracingMW ¶
func MakeAdminComponentTracingMW(tracer tracing.OpentracingClient) func(AdminComponent) AdminComponent
MakeAdminComponentTracingMW makes a tracing middleware at component level.
func MakeComponentInstrumentingMW ¶
MakeComponentInstrumentingMW makes an instrumenting middleware for the event component.
func MakeComponentLoggingMW ¶
MakeComponentLoggingMW makes a logging middleware for the event component.
func MakeComponentTracingMW ¶
func MakeComponentTracingMW(tracer tracing.OpentracingClient) func(Component) Component
MakeComponentTracingMW makes a tracing middleware at component level.
func MakeConsoleModuleInstrumentingMW ¶
func MakeConsoleModuleInstrumentingMW(h metrics.Histogram) func(ConsoleModule) ConsoleModule
MakeConsoleModuleInstrumentingMW makes an instrumenting middleware at module level.
func MakeConsoleModuleLoggingMW ¶
func MakeConsoleModuleLoggingMW(log log.Logger) func(ConsoleModule) ConsoleModule
MakeConsoleModuleLoggingMW makes a logging middleware for the console module.
func MakeConsoleModuleTracingMW ¶
func MakeConsoleModuleTracingMW(tracer tracing.OpentracingClient) func(ConsoleModule) ConsoleModule
MakeConsoleModuleTracingMW makes a tracing middleware at component level.
func MakeEventEndpoint ¶
func MakeEventEndpoint(c MuxComponent) cs.Endpoint
MakeEventEndpoint makes the event endpoint.
func MakeEventsDBModuleInstrumentingMW ¶
func MakeEventsDBModuleInstrumentingMW(h metrics.Histogram) func(database.EventsDBModule) database.EventsDBModule
MakeEventsDBModuleInstrumentingMW makes an instrumenting middleware at module level.
func MakeEventsDBModuleLoggingMW ¶
func MakeEventsDBModuleLoggingMW(log log.Logger) func(database.EventsDBModule) database.EventsDBModule
MakeEventsDBModuleLoggingMW makes a logging middleware for the statistic module.
func MakeEventsDBModuleTracingMW ¶
func MakeEventsDBModuleTracingMW(tracer tracing.OpentracingClient) func(database.EventsDBModule) database.EventsDBModule
MakeEventsDBModuleTracingMW makes a tracing middleware at component level.
func MakeHTTPEventHandler ¶
MakeHTTPEventHandler makes a HTTP handler for the event endpoint.
func MakeMuxComponentInstrumentingMW ¶
func MakeMuxComponentInstrumentingMW(h metrics.Histogram) func(MuxComponent) MuxComponent
MakeMuxComponentInstrumentingMW makes an instrumenting middleware for the mux component.
func MakeMuxComponentLoggingMW ¶
func MakeMuxComponentLoggingMW(log log.Logger) func(MuxComponent) MuxComponent
MakeMuxComponentLoggingMW makes a logging middleware for the mux component.
func MakeMuxComponentTracingMW ¶
func MakeMuxComponentTracingMW(tracer tracing.OpentracingClient) func(MuxComponent) MuxComponent
MakeMuxComponentTracingMW makes a tracing middleware at component level.
func MakeMuxComponentTrackingMW ¶
func MakeMuxComponentTrackingMW(sentry tracking.SentryTracking, logger log.Logger) func(MuxComponent) MuxComponent
MakeMuxComponentTrackingMW makes an error tracking middleware, where the errors are sent to Sentry.
func MakeStatisticModuleInstrumentingMW ¶
func MakeStatisticModuleInstrumentingMW(h metrics.Histogram) func(StatisticModule) StatisticModule
MakeStatisticModuleInstrumentingMW makes an instrumenting middleware at module level.
func MakeStatisticModuleLoggingMW ¶
func MakeStatisticModuleLoggingMW(log log.Logger) func(StatisticModule) StatisticModule
MakeStatisticModuleLoggingMW makes a logging middleware for the statistic module.
func MakeStatisticModuleTracingMW ¶
func MakeStatisticModuleTracingMW(tracer tracing.OpentracingClient) func(StatisticModule) StatisticModule
MakeStatisticModuleTracingMW makes a tracing middleware at component level.
Types ¶
type AdminComponent ¶
type AdminComponent interface {
AdminEvent(ctx context.Context, adminEvent *fb.AdminEvent) error
}
AdminComponent is the admin event component interface.
func NewAdminComponent ¶
func NewAdminComponent(modulesToCallForCreate []FuncEvent, modulesToCallForUpdate []FuncEvent, modulesToCallForDelete []FuncEvent, modulesToCallForAction []FuncEvent) AdminComponent
NewAdminComponent returns an admin event component.
type Component ¶
Component is the event component interface.
func NewComponent ¶
func NewComponent(modulesToCallForStandardEvent []FuncEvent, modulesToCallForErrorEvent []FuncEvent) Component
NewComponent returns an event component.
type ConsoleModule ¶
ConsoleModule is the interface of the console module.
func NewConsoleModule ¶
func NewConsoleModule(logger log.Logger) ConsoleModule
NewConsoleModule returns a Console module.
type ErrInvalidArgument ¶
type ErrInvalidArgument struct {
InvalidParam string
}
ErrInvalidArgument is returned when one or more arguments are invalid.
func (ErrInvalidArgument) Error ¶
func (e ErrInvalidArgument) Error() string
type Influx ¶
type Influx interface { Write(bp influx.BatchPoints) error Close() }
Influx is the influx DB interface.
type KeycloakRequest ¶
KeycloakRequest is the Request for KeycloakEventReceiver endpoint.
type MuxComponent ¶
MuxComponent is the Mux component interface.
func NewMuxComponent ¶
func NewMuxComponent(component Component, adminComponent AdminComponent) MuxComponent
NewMuxComponent returns a Mux component.
type StatisticModule ¶
StatisticModule is the interface of the keycloak statistic module.
func NewStatisticModule ¶
func NewStatisticModule(influx metrics.Metrics) StatisticModule
NewStatisticModule returns a Statistic module.