Documentation ¶
Index ¶
- Variables
- type Logger
- type Option
- type Storage
- func (s *Storage) AddRequest(request []byte) error
- func (s *Storage) Close() error
- func (s *Storage) Cookies(u *url.URL) string
- func (s *Storage) GetRequest() ([]byte, error)
- func (s *Storage) Init() error
- func (s *Storage) IsVisited(id uint64) (bool, error)
- func (s *Storage) QueueSize() (int, error)
- func (s *Storage) SetCookies(u *url.URL, cookies string)
- func (s *Storage) Visited(id uint64) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option enables configuration of the storage.
func Mode ¶
Mode determines the file creation mode. It defaults to 0666.
func NoHistory ¶
NoHistory configures the storage to not store history. The bool parameter is default response when Colly asks "isVisited". Use this for cases where you track the visited state externally.
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a implementation for colly/queue and colly/storage
func New ¶
New creates a new storage implementation for Colly. A database will be created at the provided path if it does not already exist.
func (*Storage) AddRequest ¶
AddRequest implements the colly.Storage interface.
func (*Storage) Close ¶
Close ensures the database is left in a valid state.
func (*Storage) Cookies ¶
Cookies implements the colly.Storage interface.
func (*Storage) GetRequest ¶
GetRequest implements the colly.Storage interface.
func (*Storage) IsVisited ¶
IsVisited implements the colly.Storage interface.
func (*Storage) QueueSize ¶
QueueSize implements the colly.Queue interface.
func (*Storage) SetCookies ¶
SetCookies implements the colly.Storage interface.