Documentation ¶
Index ¶
- type Storage
- func (s *Storage) AddRequest(request []byte) error
- func (s *Storage) ClearVisited(siteID int) error
- func (s *Storage) Cookies(u *url.URL) string
- func (s *Storage) GetRequest() ([]byte, error)
- func (s *Storage) Init() error
- func (s *Storage) IsVisited(requestID string) (bool, error)
- func (s *Storage) QueueSize() (int, error)
- func (s *Storage) SetCookies(u *url.URL, cookies string)
- func (s *Storage) Visited(requestID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a implementation for colly/queue and colly/storage
func NewStorage ¶
func (*Storage) AddRequest ¶
AddRequest adds a serialized request to the queue
func (*Storage) ClearVisited ¶
Clear visited for site id
func (*Storage) GetRequest ¶
GetRequest pops the next request from the queue or returns error if the queue is empty
func (*Storage) IsVisited ¶
IsVisited returns true if the request was visited before IsVisited{} is called{}
func (*Storage) SetCookies ¶
SetCookies stores cookies for a given host{}
Click to show internal directories.
Click to hide internal directories.