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, mime string) (*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 LevelIterator
- type LevelStore
- type MemoryIterator
- type MemoryStore
- type Queue
- type Record
- type Server
- 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 http.HandlerFunc) *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)
View Source
const Version = "0.1.4"
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) 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 Config ¶
func (*Config) CreateStore ¶ added in v0.1.2
type LevelIterator ¶ added in v0.1.2
func (*LevelIterator) NextRecord ¶ added in v0.1.2
func (it *LevelIterator) NextRecord() (*Record, bool)
type LevelStore ¶ added in v0.1.2
type LevelStore struct {
// contains filtered or unexported fields
}
func NewLevelStore ¶ added in v0.1.2
func NewLevelStore(path string, sync bool) *LevelStore
func (*LevelStore) Close ¶ added in v0.1.2
func (s *LevelStore) Close()
func (*LevelStore) Drop ¶ added in v0.1.2
func (s *LevelStore) Drop()
func (*LevelStore) Iterator ¶ added in v0.1.2
func (s *LevelStore) Iterator() Iterator
func (*LevelStore) Put ¶ added in v0.1.2
func (s *LevelStore) Put(record *Record) error
func (*LevelStore) Remove ¶ added in v0.1.2
func (s *LevelStore) Remove(id int) error
type MemoryIterator ¶ added in v0.1.2
type MemoryIterator struct { }
func (*MemoryIterator) NextRecord ¶ added in v0.1.2
func (it *MemoryIterator) NextRecord() (*Record, bool)
type MemoryStore ¶ added in v0.1.2
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶ added in v0.1.2
func NewMemoryStore() *MemoryStore
func (*MemoryStore) Drop ¶ added in v0.1.2
func (s *MemoryStore) Drop()
func (*MemoryStore) Iterator ¶ added in v0.1.2
func (s *MemoryStore) Iterator() Iterator
func (*MemoryStore) Put ¶ added in v0.1.2
func (s *MemoryStore) Put(record *Record) error
func (*MemoryStore) Remove ¶ added in v0.1.2
func (s *MemoryStore) Remove(id int) error
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) EnqueueItem ¶
type Record ¶
type Record struct { Value []byte Mime string Queue string // contains filtered or unexported fields }
func (*Record) ContentType ¶ added in v0.1.3
type Server ¶
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.