bus

package
v0.0.0-...-1256235 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus interface {
	AddSlot(slot Slot)
	AddSlotHandler(slotType SlotType, handler Handler, matches ...interface{}) error
	DelSlotHandler(slotType SlotType, matches ...interface{}) error
}

type ContextHttp

type ContextHttp struct {
	iris.Context
	RelativePath string
}

type Handler

type Handler func(interface{})

type Slot

type Slot interface {
	AddHandler(handler Handler, matches ...interface{})
	DelHandler(matches ...interface{})
	Type() SlotType
}

type SlotBus

type SlotBus struct {
	// contains filtered or unexported fields
}

func NewSlotBus

func NewSlotBus() *SlotBus

func (*SlotBus) AddSlot

func (bus *SlotBus) AddSlot(slot Slot)

func (*SlotBus) AddSlotHandler

func (bus *SlotBus) AddSlotHandler(slotType SlotType, handler Handler,
	matches ...interface{}) error

func (*SlotBus) DelSlotHandler

func (bus *SlotBus) DelSlotHandler(slotType SlotType, matches ...interface{}) error

type SlotType

type SlotType int
const (
	SlotHttp SlotType = iota
	SlotRedis
	SlotKafka
)

Jump to

Keyboard shortcuts

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