Documentation ¶
Overview ¶
Package exporter provides methods to interact with the failure_assocation_rules BigQuery table.
Index ¶
- type Client
- type FakeClient
- func (fc *FakeClient) Errs(errs []error) *FakeClient
- func (fc *FakeClient) Insert(ctx context.Context, rows []*bqpb.FailureAssociationRulesHistoryRow) error
- func (fc *FakeClient) LastUpdate(t time.Time) *FakeClient
- func (fc *FakeClient) NewestLastUpdated(ctx context.Context) (bigquery.NullTimestamp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods to export and read failure_association_rules_history BigQuery tale
func NewClient ¶
NewClient creates a new client for exporting failure association rules via the BigQuery Write API.
func (*Client) NewestLastUpdated ¶
NewestLastUpdated get the largest value in the lastUpdated field from the BigQuery table. The last_updated field is synced from the spanner table which is a spanner commit timestamp. This the newest last_updated field indicate newest update of the failureAssociationRules spanner table which has been synced to BigQuery.
type FakeClient ¶
type FakeClient struct { Insertions []*bqpb.FailureAssociationRulesHistoryRow // contains filtered or unexported fields }
FakeClient represents a fake implementation of the failure association rules BigQuery exporter, for testing.
func NewFakeClient ¶
func NewFakeClient() *FakeClient
NewFakeClient creates a new FakeClient for exporting failure association rules.
func (*FakeClient) Errs ¶
func (fc *FakeClient) Errs(errs []error) *FakeClient
Errs set errors return in the future calls in sequence.
func (*FakeClient) Insert ¶
func (fc *FakeClient) Insert(ctx context.Context, rows []*bqpb.FailureAssociationRulesHistoryRow) error
Insert inserts the given rows in BigQuery.
func (*FakeClient) LastUpdate ¶
func (fc *FakeClient) LastUpdate(t time.Time) *FakeClient
LastUpdate set the output of NewestLastUpdated in future calls.
func (*FakeClient) NewestLastUpdated ¶
func (fc *FakeClient) NewestLastUpdated(ctx context.Context) (bigquery.NullTimestamp, error)
NewestLastUpdated get the largest value in the lastUpdated field from the BigQuery table.