Documentation ¶
Index ¶
Constants ¶
View Source
const ( // REST server REST Server = "rest" // GRPC server GRPC Server = "grpc" // GraphQL server GraphQL Server = "graphql" // Kafka worker Kafka Worker = "kafka" // RedisSubscriber worker RedisSubscriber Worker = "redis_subscriber" // RabbitMQ worker RabbitMQ Worker = "rabbit_mq" // Scheduler worker Scheduler Worker = "scheduler" // TaskQueue worker TaskQueue Worker = "task_queue" // PostgresListener worker PostgresListener Worker = "postgres_listener" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MiddlewareGroup ¶
type MiddlewareGroup map[string][]MiddlewareFunc
MiddlewareGroup type
func (MiddlewareGroup) Add ¶
func (mw MiddlewareGroup) Add(fullMethod string, middlewareFunc ...MiddlewareFunc)
Add register full method to middleware
func (MiddlewareGroup) AddProto ¶
func (mw MiddlewareGroup) AddProto(protoDesc protoreflect.FileDescriptor, handler interface{}, middlewareFunc ...MiddlewareFunc)
AddProto register proto for grpc middleware
type Server ¶
type Server string
Server is the type returned by a classifier server (REST, gRPC, GraphQL)
type Worker ¶
type Worker string
Worker is the type returned by a classifier worker (kafka, redis subscriber, rabbitmq, scheduler, task queue)
type WorkerErrorHandler ¶
type WorkerErrorHandler func(ctx context.Context, workerType Worker, workerName string, message []byte, err error)
WorkerErrorHandler types
type WorkerHandlerFunc ¶
WorkerHandlerFunc types
type WorkerHandlerGroup ¶
type WorkerHandlerGroup struct { Handlers []struct { Pattern string HandlerFunc WorkerHandlerFunc ErrorHandler []WorkerErrorHandler } }
WorkerHandlerGroup group of worker handlers by pattern string
func (*WorkerHandlerGroup) Add ¶
func (m *WorkerHandlerGroup) Add(pattern string, handlerFunc WorkerHandlerFunc, errHandlers ...WorkerErrorHandler)
Add method from WorkerHandlerGroup, pattern can contains unique topic name, key, and task name
Click to show internal directories.
Click to hide internal directories.