Documentation ¶
Index ¶
Constants ¶
View Source
const ( S3URITemplate = "s3://%s/%s" BigQueryTableTemplate = "%s.%s" )
Variables ¶
View Source
var (
ErrMaxRetry = errors.New("max retry count reached")
)
View Source
var (
ErrNoRequest = errors.New("no import request")
)
Functions ¶
This section is empty.
Types ¶
type App ¶
func (*App) ReceiveAndProcess ¶
type BigQueryDestination ¶
type BigQueryDestination struct { ProjectID string `yaml:"project_id"` Table string `yaml:"table"` Dataset string `yaml:"dataset"` }
func (BigQueryDestination) String ¶
func (bq BigQueryDestination) String() string
type BigQueryTransporter ¶
type BigQueryTransporter struct {
// contains filtered or unexported fields
}
func NewBigQueryTransporter ¶
func NewBigQueryTransporter(conf *Config, c *cloud.Cloud) *BigQueryTransporter
func (*BigQueryTransporter) Process ¶
func (t *BigQueryTransporter) Process(ctx context.Context, req *ImportRequest) error
type Config ¶
type Config struct { QueueName string `yaml:"queue_name"` GCSTemporaryBucket string `yaml:"gcs_temporary_bucket"` Cloud *cloud.Config `yaml:"cloud"` S3 *S3Soruce `yaml:"s3"` BigQuery *BigQueryDestination `yaml:"big_query"` Rules []*Rule `yaml:"rules"` }
func LoadConfig ¶
func (*Config) GetMergedRules ¶
type ImportRequest ¶
type ImportRequest struct { ID string `json:"id,omitempty"` ReceiptHandle string `json:"receipt_handle,omitempty"` Records []*ImportRequestRecord `json:"records"` }
type ImportRequestRecord ¶
type ImportRequestRecord struct { Source *ImportSource `json:"source"` Target *ImportTarget `json:"target"` }
type ImportSource ¶
func (ImportSource) String ¶
func (s ImportSource) String() string
type ImportTarget ¶
type Receiver ¶
type Receiver interface { Receive(context.Context) (*ImportRequest, error) Complete(context.Context, *ImportRequest) error }
type Rule ¶
type Rule struct { S3 *S3Soruce `yaml:"s3"` BigQuery *BigQueryDestination `yaml:"big_query"` // contains filtered or unexported fields }
func (*Rule) BuildImportTarget ¶
func (r *Rule) BuildImportTarget(capture []string) *ImportTarget
func (*Rule) MatchEventRecord ¶
func (r *Rule) MatchEventRecord(record events.S3EventRecord) (bool, []string)
type S3Soruce ¶
type SQSReceiver ¶
type SQSReceiver struct {
// contains filtered or unexported fields
}
func NewSQSReceiver ¶
func NewSQSReceiver(conf *Config, c *cloud.Cloud) (*SQSReceiver, error)
func (*SQSReceiver) Complete ¶
func (r *SQSReceiver) Complete(_ context.Context, req *ImportRequest) error
func (*SQSReceiver) Receive ¶
func (r *SQSReceiver) Receive(ctx context.Context) (*ImportRequest, error)
Click to show internal directories.
Click to hide internal directories.