Documentation ¶
Overview ¶
Package bitmapist implements standalone bitmapist server that can be used instead of Redis for https://github.com/Doist/bitmapist library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { Print(v ...interface{}) Printf(format string, v ...interface{}) Println(v ...interface{}) }
Logger is a set of methods used to log information. *log.Logger implements this interface.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a standalone bitmapist server implementation. It's intended to be run on top of github.com/artyom/red.Server which handles redis protocol-level details and networking.
func (*Server) Backup ¶
Backup writes current on-disk saved database to Writer w. It's not safe to copy database file while it's used, so this method can be used to get a consistent copy of database.
func (*Server) Shutdown ¶
Shutdown performs saves current state on disk and closes database. Shutdown blocks until state is saved and database is closed. Server should not be used afterwards.
func (*Server) WithLogger ¶
WithLogger configures server to use provided Logger.