Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCRetryErrorFilter ¶
bqGRPCRetryErrorFilter returns a Retry error filter to be used for retrying GRPC Google API operations (e.g. BQ Storage client)
Types ¶
type Client ¶
type Client interface {
// Put a row of data, with the possibility to opt-out of any scheme validation.
//
// No context is passed here, instead background context is always used.
// Reason being is as we always want to be able to write to BQ,
// even if the actual parent context is already closed.
//
// A boolean is also returned indicating whether or not the client
// has flushed as part of its Put process.
Put(data interface{}) (bool, error)
// Flush any data already Put but not yet written to BigQuery.
Flush() error
// Close the BQ Client
Close() error
}
Client is the interface we expect a BQ client to implement. The only reason for this abstraction is so we can easily unit test this class, without actual BQ interaction.
type Retryer ¶
type Retryer struct {
// contains filtered or unexported fields
}
Retryer is a retryer inspired by other community back-off implementations, in order to not have another dependency added to this library, while still being able to rely on existing retry-related google code of dependencies already required by this library for its core functionality
func NewRetryer ¶
Click to show internal directories.
Click to hide internal directories.