event

package
v2.6.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
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

func MakeComponentInstrumentingMW(h metrics.Histogram) func(Component) Component

MakeComponentInstrumentingMW makes an instrumenting middleware for the event component.

func MakeComponentLoggingMW

func MakeComponentLoggingMW(log log.Logger) func(Component) Component

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

func MakeHTTPEventHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server

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

type Component interface {
	Event(ctx context.Context, event *fb.Event) error
}

Component is the event component interface.

func NewComponent

func NewComponent(modulesToCallForStandardEvent []FuncEvent,
	modulesToCallForErrorEvent []FuncEvent) Component

NewComponent returns an event component.

type ConsoleModule

type ConsoleModule interface {
	Print(context.Context, map[string]string) error
}

ConsoleModule is the interface of the console module.

func NewConsoleModule

func NewConsoleModule(logger log.Logger) ConsoleModule

NewConsoleModule returns a Console module.

type Endpoints

type Endpoints struct {
	Endpoint endpoint.Endpoint
}

Endpoints wraps a service behind a set of endpoints.

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 FuncEvent

type FuncEvent = func(context.Context, map[string]string) error

FuncEvent is the function to call for a given event.

type Influx

type Influx interface {
	Write(bp influx.BatchPoints) error
	Close()
}

Influx is the influx DB interface.

type KeycloakRequest

type KeycloakRequest struct {
	Type   string
	Object string `json:"Obj"`
}

KeycloakRequest is the Request for KeycloakEventReceiver endpoint.

type MuxComponent

type MuxComponent interface {
	Event(ctx context.Context, eventType string, obj []byte) error
}

MuxComponent is the Mux component interface.

func NewMuxComponent

func NewMuxComponent(component Component, adminComponent AdminComponent) MuxComponent

NewMuxComponent returns a Mux component.

type Request

type Request struct {
	Type   string
	Object []byte
}

Request has the fields Type and Object.

type StatisticModule

type StatisticModule interface {
	Stats(context.Context, map[string]string) error
}

StatisticModule is the interface of the keycloak statistic module.

func NewStatisticModule

func NewStatisticModule(influx metrics.Metrics) StatisticModule

NewStatisticModule returns a Statistic module.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL