purger

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FanIn added in v1.1.0

func FanIn(done <-chan interface{}, channels ...<-chan *TableBatchResult) chan *TableBatchResult

FanIn FanIn

Types

type AzureTablePurger

type AzureTablePurger interface {
	PurgeEntities() (PurgeResult, error)
	PurgeEntitiesWithin(period *util.Period) (PurgeResult, error)
}

AzureTablePurger purges entities from Storage Tables

func NewTablePurger

func NewTablePurger(accountName, accountKey, tableName string, purgeEntitiesOlderThanDays, periodLengthInHours, numWorkers int, usePool, dryRun bool) (AzureTablePurger, error)

NewTablePurger creates a new Basic Purger

func NewTablePurgerWithClient

func NewTablePurgerWithClient(client storage.Client, accountName, accountKey, tableName string, purgeEntitiesOlderThanDays, periodLengthInHours, numWorkers int, usePool, dryRun bool) (AzureTablePurger, error)

NewTablePurgerWithClient creates a new Basic Purger

type DefaultQueryOptionsGenerator added in v1.3.0

type DefaultQueryOptionsGenerator struct {
	// contains filtered or unexported fields
}

func (*DefaultQueryOptionsGenerator) Generate added in v1.3.0

func (q *DefaultQueryOptionsGenerator) Generate(done <-chan interface{}) <-chan *storage.QueryOptions

type DefaultTablePurger

type DefaultTablePurger struct {
	Metrics *metrics.Metrics
	// contains filtered or unexported fields
}

DefaultTablePurger default table purger

func (*DefaultTablePurger) PurgeEntities

func (d *DefaultTablePurger) PurgeEntities() (PurgeResult, error)

PurgeEntities sdf

func (*DefaultTablePurger) PurgeEntitiesWithin added in v1.4.0

func (d *DefaultTablePurger) PurgeEntitiesWithin(period *util.Period) (PurgeResult, error)

PurgeEntitiesWithin all entities within Period

type FixedDurationQueryOptionsGenerator added in v1.3.0

type FixedDurationQueryOptionsGenerator struct {
	// contains filtered or unexported fields
}

func (*FixedDurationQueryOptionsGenerator) Generate added in v1.3.0

func (q *FixedDurationQueryOptionsGenerator) Generate(done <-chan interface{}) <-chan *storage.QueryOptions

type Partition

type Partition struct {
	// contains filtered or unexported fields
}

Partition contains the entities grouped by partition

type PurgeResult

type PurgeResult struct {
	PageCount       int64     `json:"page_count"`
	PartitionCount  int64     `json:"partition_count"`
	RowCount        int64     `json:"row_count"`
	BatchCount      int64     `json:"batch_count"`
	BatchErrorCount int64     `json:"batch_error_count"`
	RowErrorCount   int64     `json:"row_error_count"`
	StartTime       time.Time `json:"start_time"`
	EndTime         time.Time `json:"end_time"`
}

PurgeResult details and metrics about the purge operation

func (*PurgeResult) HasErrors added in v1.1.0

func (p *PurgeResult) HasErrors() bool

HasErrors whether or not any error occurred during the purge job

type QueryOptionsGenerator added in v1.3.0

type QueryOptionsGenerator interface {
	Generate(done <-chan interface{}) <-chan *storage.QueryOptions
}

func NewDefaultQueryOptionsGenerator added in v1.3.0

func NewDefaultQueryOptionsGenerator(start, end time.Time) (QueryOptionsGenerator, error)

func SenderWithLogging added in v1.1.2

func SenderWithLogging(duration time.Time) QueryOptionsGenerator

type QueryOptionsGeneratorFunc added in v1.3.0

type QueryOptionsGeneratorFunc func(done <-chan interface{}) <-chan *storage.QueryOptions

QueryOptionsGeneratorFunc is a method that implements the Sender interface.

func (QueryOptionsGeneratorFunc) Generate added in v1.3.0

func (sf QueryOptionsGeneratorFunc) Generate(done <-chan interface{}) <-chan *storage.QueryOptions

Generate implements the QueryOptionsGenerator interface on QueryOptionsGeneratorFunc.

type QueryResult

type QueryResult struct {
	Error             error
	EntityQueryResult *storage.EntityQueryResult
}

QueryResult groups 2 query possible outcomes

type TableBatchResult added in v1.1.0

type TableBatchResult struct {
	Error error
	Batch *storage.TableBatch
}

TableBatchResult holds the result of a batch operation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL