Documentation
¶
Index ¶
- type API
- type ArchiveOrgArchiver
- type Archiver
- type ChromeArchiver
- type Client
- type GetJobOptions
- type Job
- type JobClient
- func (c *JobClient) Close() error
- func (c *JobClient) NextArtifactWriter(ctx context.Context, name string) (libraries.ArtifactWriter, error)
- func (c *JobClient) UpdateJob(ctx context.Context, job Job) error
- func (c *JobClient) WriteArtifact(ctx context.Context, name string, data []byte) (int64, string, error)
- func (c *JobClient) WriteArtifactManifest(ctx context.Context, manifest libraries.ArtifactManifest) error
- type JobRequest
- type OpenGraphArchiver
- type RemoteWorker
- type Resolution
- type Scheduler
- type Strategy
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
type ArchiveOrgArchiver ¶
type ArchiveOrgArchiver struct{}
type Archiver ¶
type Archiver struct {
ChromeArchiver *ChromeArchiver
ArchiveOrgArchiver *ArchiveOrgArchiver
OpenGraphArchiver *OpenGraphArchiver
}
type ChromeArchiver ¶
type ChromeArchiver struct {
SavePDF bool
SaveSinglefile bool
ScreenshotResolutions []Resolution
}
type Client ¶
func (*Client) GetJobRequest ¶
func (c *Client) GetJobRequest(ctx context.Context) (*JobRequest, error)
type GetJobOptions ¶
type GetJobOptions struct {
}
type JobClient ¶
type JobClient struct {
LibraryID string
Origin string
SnapshotID string
Endpoint string
Token string
Client *http.Client
}
func (*JobClient) NextArtifactWriter ¶
func (c *JobClient) NextArtifactWriter(ctx context.Context, name string) (libraries.ArtifactWriter, error)
NextArtifactWriter implements libraries.SnapshotWriter.
func (*JobClient) WriteArtifact ¶
func (c *JobClient) WriteArtifact(ctx context.Context, name string, data []byte) (int64, string, error)
WriteArtifact implements libraries.SnapshotWriter.
func (*JobClient) WriteArtifactManifest ¶
func (c *JobClient) WriteArtifactManifest(ctx context.Context, manifest libraries.ArtifactManifest) error
WriteArtifactManifest implements libraries.SnapshotWriter.
type JobRequest ¶
type OpenGraphArchiver ¶
type OpenGraphArchiver struct{}
type Resolution ¶
type Resolution string
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(indexer indexers.Indexer, libraryReaders map[string]libraries.LibraryReader, libraryWriters map[string]libraries.LibraryWriter) *Scheduler
func (*Scheduler) GetJobRequest ¶
func (s *Scheduler) GetJobRequest(ctx context.Context, options *GetJobOptions) (*JobRequest, error)
func (*Scheduler) ScheduleSnapshot ¶
TODO: Support multiple libraries? What's the use case?
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
TODO: For now the intent is to have a single code path for the embedded worker and remote workers for maintainability reasons. But we should consider supporting the embedded worker directly using the job channel and library, which could reduce memory usage by a fair bit given that there's no extra buffering involved
Click to show internal directories.
Click to hide internal directories.