Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { // Ch is used to send recieved values. Ch chan<- *MessageCloser // Done is used to indicate a session has expired or was otherwise // closed. Done chan<- struct{} }
Handler contains details on how to route values.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a cache of expiring sessions with registered handlers.
func NewManager ¶
func NewManager(capacity int, hf HandlerFunc) *Manager
NewManager constructs a manager with a default handler hf and cache capacity.
func (*Manager) Enqueue ¶
func (m *Manager) Enqueue(msg *MessageCloser) error
Enqueue a value and route it to a handler.
Click to show internal directories.
Click to hide internal directories.