Documentation ¶
Index ¶
- type Option
- func WithBrowserHost(host string) Option
- func WithBrowserPort(port int) Option
- func WithConfigCache(dbAdapter database.ConfigCache) Option
- func WithLogWriter(lc logwriter.LogWriter) Option
- func WithProxyHost(host string) Option
- func WithProxyPort(port int) Option
- func WithScreenshotWriter(sw screenshotwriter.ScreenshotWriter) Option
- type Registry
- func (sr *Registry) CloseWait(timeout time.Duration)
- func (sr *Registry) CurrentSessions() int
- func (sr *Registry) Get(sessId int) *Session
- func (sr *Registry) GetNextAvailable(ctx context.Context) (*Session, error)
- func (sr *Registry) MaxSessions() int
- func (sr *Registry) NewDirectSession(uri, crawlExecutionId, jobExecutionId string) (*Session, error)
- func (sr *Registry) Release(sess *Session)
- type Session
- func (sess *Session) AbortFetch()
- func (sess *Session) Context() context.Context
- func (sess *Session) Fetch(ctx context.Context, QUri *frontierV1.QueuedUri, ...) (result *harvester.RenderResult, err error)
- func (sess *Session) GetReplacementScript(uri string) *configV1.BrowserScript
- func (sess *Session) Notify(reqId string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.1.0
type Option interface {
// contains filtered or unexported methods
}
SessionOption configures Session Registry.
func WithBrowserHost ¶
func WithBrowserPort ¶
func WithConfigCache ¶ added in v0.2.2
func WithConfigCache(dbAdapter database.ConfigCache) Option
func WithLogWriter ¶ added in v0.2.0
func WithProxyHost ¶
func WithProxyPort ¶
func WithScreenshotWriter ¶ added in v0.1.0
func WithScreenshotWriter(sw screenshotwriter.ScreenshotWriter) Option
type Registry ¶ added in v0.1.0
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶ added in v0.1.0
func (*Registry) CurrentSessions ¶ added in v0.1.0
func (*Registry) GetNextAvailable ¶ added in v0.1.0
GetNextAvailable returns next session from the pool.
func (*Registry) MaxSessions ¶ added in v0.1.0
func (*Registry) NewDirectSession ¶ added in v0.1.0
type Session ¶
type Session struct { Id int UserAgent string Requests requests.RequestRegistry RequestedUrl *frontierV1.QueuedUri CrawlConfig *configV1.CrawlConfig PolitenessConfig *configV1.ConfigObject // contains filtered or unexported fields }
func (*Session) AbortFetch ¶
func (sess *Session) AbortFetch()
func (*Session) Fetch ¶
func (sess *Session) Fetch(ctx context.Context, QUri *frontierV1.QueuedUri, crawlConf *configV1.ConfigObject) (result *harvester.RenderResult, err error)
func (*Session) GetReplacementScript ¶ added in v0.1.5
func (sess *Session) GetReplacementScript(uri string) *configV1.BrowserScript
Click to show internal directories.
Click to hide internal directories.