Documentation ¶
Index ¶
- Constants
- func Stod(val string, scale ...time.Duration) (time.Duration, error)
- type Application
- func (a *Application) Complete(name string, id int) (bool, error)
- func (a *Application) Dequeue(name string, wait time.Duration, timeout time.Duration) (*Record, error)
- func (a *Application) Enqueue(name string, value []byte) (*Record, error)
- func (a *Application) GetItem(id int) (*Item, bool)
- func (a *Application) GetQueue(name string) *Queue
- func (a *Application) Info(name string, id int) (*Info, error)
- func (a *Application) PutItem(item *Item)
- func (a *Application) RemoveItem(id int)
- func (a *Application) Stats(name string) map[string]int
- type Config
- type Info
- type Item
- type Iterator
- type Json
- type Queue
- type Record
- type Server
- func (s *Server) BeforeHandler(w http.ResponseWriter, req *http.Request) bool
- func (s *Server) CompleteHandler(w http.ResponseWriter, req *http.Request)
- func (s *Server) DequeueHandler(w http.ResponseWriter, req *http.Request)
- func (s *Server) EnqueueHandler(w http.ResponseWriter, req *http.Request)
- func (s *Server) HandleFunc(route string, fn func(http.ResponseWriter, *http.Request)) *mux.Route
- func (s *Server) InfoHandler(w http.ResponseWriter, req *http.Request)
- func (s *Server) ListenAndServe() error
- func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (s *Server) StatsHandler(w http.ResponseWriter, req *http.Request)
- type Stats
- type Store
Constants ¶
View Source
const NilDuration = time.Duration(-1)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication(store *Store) *Application
func (*Application) Enqueue ¶
func (a *Application) Enqueue(name string, value []byte) (*Record, error)
func (*Application) GetQueue ¶
func (a *Application) GetQueue(name string) *Queue
func (*Application) PutItem ¶
func (a *Application) PutItem(item *Item)
func (*Application) RemoveItem ¶
func (a *Application) RemoveItem(id int)
type Iterator ¶
func NewIterator ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) EnqueueItem ¶
type Server ¶
func (*Server) BeforeHandler ¶
func (*Server) CompleteHandler ¶
func (s *Server) CompleteHandler(w http.ResponseWriter, req *http.Request)
func (*Server) DequeueHandler ¶
func (s *Server) DequeueHandler(w http.ResponseWriter, req *http.Request)
func (*Server) EnqueueHandler ¶
func (s *Server) EnqueueHandler(w http.ResponseWriter, req *http.Request)
func (*Server) HandleFunc ¶
func (*Server) InfoHandler ¶
func (s *Server) InfoHandler(w http.ResponseWriter, req *http.Request)
func (*Server) ListenAndServe ¶
func (*Server) StatsHandler ¶ added in v0.1.1
func (s *Server) StatsHandler(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.