Documentation
¶
Index ¶
- Variables
- func MockTestHelper(t *testing.T, table *schema.Table, ...)
- func New(logger zerolog.Logger, spec Spec, hnClient *hackernews.Client, ...) (schema.ClientMeta, error)
- func UnixTimeResolver(fieldName string) schema.ColumnResolver
- type Backend
- type Client
- type NopBackend
- type Spec
- type TestOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var JSONSchema string
Functions ¶
func MockTestHelper ¶
func MockTestHelper(t *testing.T, table *schema.Table, builder func(*testing.T, *gomock.Controller) services.HackernewsClient, opts TestOptions)
func New ¶
func New(logger zerolog.Logger, spec Spec, hnClient *hackernews.Client, backend state.Client) (schema.ClientMeta, error)
func UnixTimeResolver ¶
func UnixTimeResolver(fieldName string) schema.ColumnResolver
Types ¶
type Client ¶
type Client struct {
Spec Spec
HackerNews services.HackernewsClient
Backend state.Client
// contains filtered or unexported fields
}
func (*Client) RetryOnError ¶
RetryOnError will run the given resolver function and retry on rate limit exceeded errors or other retryable errors (like internal server errors) after waiting some amount of time.
type Spec ¶
type Spec struct {
// The number of items to fetch concurrently
ItemConcurrency int `json:"item_concurrency" jsonschema:"minimum=1,maximum=1000,default=100"`
// RFC3339 formatted timestamp. Syncing will begin with posts after this date.
// Relative values like "3 days ago" are also supported.
// If not specified, the plugin will default to 24 hours ago.
StartTime configtype.Time `json:"start_time" jsonschema:"format=date-time"`
}
func (*Spec) SetDefaults ¶
func (s *Spec) SetDefaults()
Click to show internal directories.
Click to hide internal directories.