Documentation ¶
Index ¶
- Variables
- func GetCollectionRef(ctx context.Context) (cid *config.ConfigRef)
- func GetConnectError(ctx context.Context) (err error)
- func GetCrawlExecutionId(ctx context.Context) (eid string)
- func GetHost(ctx context.Context) (host string)
- func GetIp(ctx context.Context) (ip string)
- func GetJobExecutionId(ctx context.Context) (jid string)
- func GetPort(ctx context.Context) (port string)
- func GetRequestId(ctx context.Context) (reqid string)
- func GetUri(ctx context.Context) (uri *url.URL)
- func LogWithContext(ctx context.Context, componentName string) *logger.Logger
- func LogWithContextAndRequest(ctx context.Context, req *http.Request, componentName string) *logger.Logger
- func LogWithRecordContext(rc *RecordContext, componentName string) *logger.Logger
- func OpenSessions() int64
- func RecordProxyDataAware(ctx context.Context) context.Context
- func RegisterConnectRequest(ctx filters.Context, conn *serviceconnections.Connections, proxyId int32, ...)
- func SetCollectionRef(ctx context.Context, cid *config.ConfigRef)
- func SetConnectError(ctx context.Context, err error)
- func SetConnectErrorIfNotExists(ctx context.Context, err error)
- func SetCrawlExecutionId(ctx context.Context, eid string)
- func SetHost(ctx context.Context, host string)
- func SetIp(ctx context.Context, ip string)
- func SetJobExecutionId(ctx context.Context, jid string)
- func SetPort(ctx context.Context, port string)
- func SetRecordContext(ctx context.Context, rc *RecordContext)
- func SetRequestId(ctx context.Context, reqid string)
- func SetUri(ctx context.Context, uri *url.URL)
- func WrapIfNecessary(ctx context.Context) filters.Context
- type BccSession
- type CwcSession
- type RecordContext
- func (rc *RecordContext) CancelContentWriter(msg string) error
- func (rc *RecordContext) Init(proxyId int32, conn *serviceconnections.Connections, req *http.Request, ...) *RecordContext
- func (rc *RecordContext) NotifyAllDataReceived() error
- func (rc *RecordContext) NotifyDataReceived() error
- func (rc *RecordContext) RegisterNewRequest(ctx filters.Context) error
- func (rc *RecordContext) ResponseCompleted(resp *http.Response, writeErr error)
- func (rc *RecordContext) SaveCrawlLog() error
- func (rc *RecordContext) SendMeta() (reply *contentwriter.WriteReply, err error)
- func (rc *RecordContext) SendPayload(recNum int32, p []byte) error
- func (rc *RecordContext) SendProtocolHeader(recNum int32, p []byte) error
- func (rc *RecordContext) SendRequestError(ctx filters.Context, reqErr error) error
- func (rc *RecordContext) SendResponseError(ctx filters.Context, respErr error) error
- func (rc *RecordContext) Session() int64
- func (rc *RecordContext) WaitForCompleted()
Constants ¶
This section is empty.
Variables ¶
View Source
var AlreadyCompleted = errors2.New("already completed")
Functions ¶
func GetCollectionRef ¶
func GetConnectError ¶
func GetCrawlExecutionId ¶
func GetJobExecutionId ¶
func GetRequestId ¶
func LogWithRecordContext ¶
func LogWithRecordContext(rc *RecordContext, componentName string) *logger.Logger
func OpenSessions ¶
func OpenSessions() int64
func RegisterConnectRequest ¶
func RegisterConnectRequest(ctx filters.Context, conn *serviceconnections.Connections, proxyId int32, req *http.Request, uri *url.URL)
func SetCollectionRef ¶
func SetConnectError ¶
func SetCrawlExecutionId ¶
func SetJobExecutionId ¶
func SetRecordContext ¶
func SetRecordContext(ctx context.Context, rc *RecordContext)
func SetRequestId ¶
Types ¶
type BccSession ¶
type BccSession struct { browsercontroller.BrowserController_DoClient // contains filtered or unexported fields }
type CwcSession ¶
type CwcSession struct { contentwriter.ContentWriter_WriteClient // contains filtered or unexported fields }
type RecordContext ¶
type RecordContext struct { Error error CloseFunc func() Method string Uri *url.URL FetchTimesTamp time.Time Meta *contentwriter.WriteRequest_Meta CrawlLog *logV1.CrawlLog ReplacementScript *config.BrowserScript FoundInCache bool PrecludedByRobots bool InitDone bool ProxyId int32 // contains filtered or unexported fields }
func GetRecordContext ¶
func GetRecordContext(ctx context.Context) (recordContext *RecordContext)
func NewRecordContext ¶
func NewRecordContext() *RecordContext
NewRecordContext creates a new RecordContext
func (*RecordContext) CancelContentWriter ¶
func (rc *RecordContext) CancelContentWriter(msg string) error
func (*RecordContext) Init ¶
func (rc *RecordContext) Init(proxyId int32, conn *serviceconnections.Connections, req *http.Request, uri *url.URL) *RecordContext
func (*RecordContext) NotifyAllDataReceived ¶
func (rc *RecordContext) NotifyAllDataReceived() error
func (*RecordContext) NotifyDataReceived ¶
func (rc *RecordContext) NotifyDataReceived() error
func (*RecordContext) RegisterNewRequest ¶
func (rc *RecordContext) RegisterNewRequest(ctx filters.Context) error
func (*RecordContext) ResponseCompleted ¶
func (rc *RecordContext) ResponseCompleted(resp *http.Response, writeErr error)
func (*RecordContext) SaveCrawlLog ¶
func (rc *RecordContext) SaveCrawlLog() error
func (*RecordContext) SendMeta ¶
func (rc *RecordContext) SendMeta() (reply *contentwriter.WriteReply, err error)
func (*RecordContext) SendPayload ¶
func (rc *RecordContext) SendPayload(recNum int32, p []byte) error
func (*RecordContext) SendProtocolHeader ¶
func (rc *RecordContext) SendProtocolHeader(recNum int32, p []byte) error
func (*RecordContext) SendRequestError ¶
func (rc *RecordContext) SendRequestError(ctx filters.Context, reqErr error) error
func (*RecordContext) SendResponseError ¶
func (rc *RecordContext) SendResponseError(ctx filters.Context, respErr error) error
func (*RecordContext) Session ¶
func (rc *RecordContext) Session() int64
func (*RecordContext) WaitForCompleted ¶
func (rc *RecordContext) WaitForCompleted()
Click to show internal directories.
Click to hide internal directories.