Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MuxDefault = NewMessageMux()
)
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
ServeConn(req *MessageRequest, writer ResponseWriter)
}
type HandlerFunc ¶
type HandlerFunc func(*MessageContainer, ResponseWriter)
type MessageContainer ¶
type MessageContainer struct { Header http.Header Message *model.Message // contains filtered or unexported fields }
func (*MessageContainer) Parameter ¶
func (c *MessageContainer) Parameter(name string) string
type MessageExpression ¶
func NewExpression ¶
func NewExpression() *MessageExpression
func (*MessageExpression) GetExpression ¶
func (exp *MessageExpression) GetExpression(resource string) *MessageExpression
type MessageMux ¶
type MessageMux struct {
// contains filtered or unexported fields
}
func Entry ¶
func Entry(pattern *MessagePattern, handle func(*MessageContainer, ResponseWriter)) *MessageMux
func NewMessageMux ¶
func NewMessageMux() *MessageMux
func (*MessageMux) AddFilter ¶
func (mux *MessageMux) AddFilter(filter *filter.MessageFilter)
func (*MessageMux) Entry ¶
func (mux *MessageMux) Entry(pattern *MessagePattern, handle func(*MessageContainer, ResponseWriter)) *MessageMux
func (*MessageMux) ServeConn ¶
func (mux *MessageMux) ServeConn(req *MessageRequest, writer ResponseWriter)
type MessageMuxEntry ¶
type MessageMuxEntry struct {
// contains filtered or unexported fields
}
func NewEntry ¶
func NewEntry(pattern *MessagePattern, handle func(*MessageContainer, ResponseWriter)) *MessageMuxEntry
func (*MessageMuxEntry) Handle ¶
func (entry *MessageMuxEntry) Handle(handle func(*MessageContainer, ResponseWriter)) *MessageMuxEntry
func (*MessageMuxEntry) Pattern ¶
func (entry *MessageMuxEntry) Pattern(pattern *MessagePattern) *MessageMuxEntry
type MessagePattern ¶
type MessagePattern struct {
// contains filtered or unexported fields
}
func NewPattern ¶
func NewPattern(resource string) *MessagePattern
func (*MessagePattern) Op ¶
func (pattern *MessagePattern) Op(operation string) *MessagePattern
func (*MessagePattern) Res ¶
func (pattern *MessagePattern) Res(resource string) *MessagePattern
Click to show internal directories.
Click to hide internal directories.