Documentation ¶ Index ¶ type Storage func New(dbPath string) *Storage func (s *Storage) Add(key string, count int64) func (s *Storage) Close() error func (s *Storage) Get(key string) int64 func (s *Storage) Init() error func (s *Storage) Set(key string, count int64) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Storage ¶ type Storage struct { sync.RWMutex // contains filtered or unexported fields } Storage is interface structure func New ¶ func New(dbPath string) *Storage New func implements the storage interface for gorush (https://github.com/appleboy/gorush) func (*Storage) Add ¶ func (s *Storage) Add(key string, count int64) func (*Storage) Close ¶ func (s *Storage) Close() error Close the storage connection func (*Storage) Get ¶ func (s *Storage) Get(key string) int64 func (*Storage) Init ¶ func (s *Storage) Init() error Init client storage. func (*Storage) Set ¶ func (s *Storage) Set(key string, count int64) Source Files ¶ View all Source files badger.go Click to show internal directories. Click to hide internal directories.