Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigQueryProvider ¶
type BigQueryProvider struct { // Client with the client to connect to bigquery Client *bigquery.Client // BigQueryConfig with all the configuration (schema, table, etc.) config.BigQueryConfig // Cache with a cache of operation data // in this cache we store the operations to avoid send msg by msg Cache []entities.Operation // Mutex for managing login cache access. sync.Mutex }
BigQueryProvider with a provider that stores the operation information in bigquery
func (*BigQueryProvider) Flush ¶
func (bq *BigQueryProvider) Flush() error
func (*BigQueryProvider) LaunchSendingLoop ¶
func (bq *BigQueryProvider) LaunchSendingLoop()
LaunchSendingLoop launch a loop to insert the cache data in the database
func (*BigQueryProvider) Send ¶
func (bq *BigQueryProvider) Send(operation entities.Operation) error
Send stores the operation information in a cache
func (*BigQueryProvider) SendCacheOperation ¶
func (bq *BigQueryProvider) SendCacheOperation() error
SendCacheOperation inserts all the operations in the database
type Provider ¶
type Provider interface { // Send inserts the data in the database Send(data entities.Operation) error // Flush flush the data Flush() error }
Provider with an interface that defines the monitoring provider methods
func NewBigQueryProvider ¶
func NewBigQueryProvider(cfg config.BigQueryConfig) (Provider, error)
NewBigQueryProvider
Click to show internal directories.
Click to hide internal directories.