retention

package
v0.14.3 Latest Latest
Warning

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

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

Documentation

Overview

Package retention is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlushTimeEnd

func FlushTimeEnd(opts Options, t time.Time) time.Time

FlushTimeEnd is the latest flushable time

func FlushTimeEndForBlockSize

func FlushTimeEndForBlockSize(blockSize time.Duration, t time.Time) time.Time

FlushTimeEndForBlockSize is the latest flushable time

func FlushTimeStart

func FlushTimeStart(opts Options, t time.Time) time.Time

FlushTimeStart is the earliest flushable time

func FlushTimeStartForRetentionPeriod

func FlushTimeStartForRetentionPeriod(retentionPeriod time.Duration, blockSize time.Duration, t time.Time) time.Time

FlushTimeStartForRetentionPeriod is the earliest flushable time

Types

type Configuration

type Configuration struct {
	RetentionPeriod                       time.Duration  `yaml:"retentionPeriod" validate:"nonzero"`
	FutureRetentionPeriod                 time.Duration  `yaml:"futureRetentionPeriod" validate:"nonzero"`
	BlockSize                             time.Duration  `yaml:"blockSize" validate:"nonzero"`
	BufferFuture                          time.Duration  `yaml:"bufferFuture" validate:"nonzero"`
	BufferPast                            time.Duration  `yaml:"bufferPast" validate:"nonzero"`
	BlockDataExpiry                       *bool          `yaml:"blockDataExpiry"`
	BlockDataExpiryAfterNotAccessedPeriod *time.Duration `yaml:"blockDataExpiryAfterNotAccessedPeriod"`
}

Configuration is the set of knobs to configure retention options

func (*Configuration) Options

func (c *Configuration) Options() Options

Options returns `Options` corresponding to the provided struct values

type MockOptions

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

MockOptions is a mock of Options interface

func NewMockOptions

func NewMockOptions(ctrl *gomock.Controller) *MockOptions

NewMockOptions creates a new mock instance

func (*MockOptions) BlockDataExpiry

func (m *MockOptions) BlockDataExpiry() bool

BlockDataExpiry mocks base method

func (*MockOptions) BlockDataExpiryAfterNotAccessedPeriod

func (m *MockOptions) BlockDataExpiryAfterNotAccessedPeriod() time.Duration

BlockDataExpiryAfterNotAccessedPeriod mocks base method

func (*MockOptions) BlockSize

func (m *MockOptions) BlockSize() time.Duration

BlockSize mocks base method

func (*MockOptions) BufferFuture

func (m *MockOptions) BufferFuture() time.Duration

BufferFuture mocks base method

func (*MockOptions) BufferPast

func (m *MockOptions) BufferPast() time.Duration

BufferPast mocks base method

func (*MockOptions) EXPECT

func (m *MockOptions) EXPECT() *MockOptionsMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockOptions) Equal

func (m *MockOptions) Equal(value Options) bool

Equal mocks base method

func (*MockOptions) FutureRetentionPeriod added in v0.8.2

func (m *MockOptions) FutureRetentionPeriod() time.Duration

FutureRetentionPeriod mocks base method

func (*MockOptions) RetentionPeriod

func (m *MockOptions) RetentionPeriod() time.Duration

RetentionPeriod mocks base method

func (*MockOptions) SetBlockDataExpiry

func (m *MockOptions) SetBlockDataExpiry(on bool) Options

SetBlockDataExpiry mocks base method

func (*MockOptions) SetBlockDataExpiryAfterNotAccessedPeriod

func (m *MockOptions) SetBlockDataExpiryAfterNotAccessedPeriod(period time.Duration) Options

SetBlockDataExpiryAfterNotAccessedPeriod mocks base method

func (*MockOptions) SetBlockSize

func (m *MockOptions) SetBlockSize(value time.Duration) Options

SetBlockSize mocks base method

func (*MockOptions) SetBufferFuture

func (m *MockOptions) SetBufferFuture(value time.Duration) Options

SetBufferFuture mocks base method

func (*MockOptions) SetBufferPast

func (m *MockOptions) SetBufferPast(value time.Duration) Options

SetBufferPast mocks base method

func (*MockOptions) SetFutureRetentionPeriod added in v0.8.2

func (m *MockOptions) SetFutureRetentionPeriod(value time.Duration) Options

SetFutureRetentionPeriod mocks base method

func (*MockOptions) SetRetentionPeriod

func (m *MockOptions) SetRetentionPeriod(value time.Duration) Options

SetRetentionPeriod mocks base method

func (*MockOptions) Validate

func (m *MockOptions) Validate() error

Validate mocks base method

type MockOptionsMockRecorder

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

MockOptionsMockRecorder is the mock recorder for MockOptions

func (*MockOptionsMockRecorder) BlockDataExpiry

func (mr *MockOptionsMockRecorder) BlockDataExpiry() *gomock.Call

BlockDataExpiry indicates an expected call of BlockDataExpiry

func (*MockOptionsMockRecorder) BlockDataExpiryAfterNotAccessedPeriod

func (mr *MockOptionsMockRecorder) BlockDataExpiryAfterNotAccessedPeriod() *gomock.Call

BlockDataExpiryAfterNotAccessedPeriod indicates an expected call of BlockDataExpiryAfterNotAccessedPeriod

func (*MockOptionsMockRecorder) BlockSize

func (mr *MockOptionsMockRecorder) BlockSize() *gomock.Call

BlockSize indicates an expected call of BlockSize

func (*MockOptionsMockRecorder) BufferFuture

func (mr *MockOptionsMockRecorder) BufferFuture() *gomock.Call

BufferFuture indicates an expected call of BufferFuture

func (*MockOptionsMockRecorder) BufferPast

func (mr *MockOptionsMockRecorder) BufferPast() *gomock.Call

BufferPast indicates an expected call of BufferPast

func (*MockOptionsMockRecorder) Equal

func (mr *MockOptionsMockRecorder) Equal(value interface{}) *gomock.Call

Equal indicates an expected call of Equal

func (*MockOptionsMockRecorder) FutureRetentionPeriod added in v0.8.2

func (mr *MockOptionsMockRecorder) FutureRetentionPeriod() *gomock.Call

FutureRetentionPeriod indicates an expected call of FutureRetentionPeriod

func (*MockOptionsMockRecorder) RetentionPeriod

func (mr *MockOptionsMockRecorder) RetentionPeriod() *gomock.Call

RetentionPeriod indicates an expected call of RetentionPeriod

func (*MockOptionsMockRecorder) SetBlockDataExpiry

func (mr *MockOptionsMockRecorder) SetBlockDataExpiry(on interface{}) *gomock.Call

SetBlockDataExpiry indicates an expected call of SetBlockDataExpiry

func (*MockOptionsMockRecorder) SetBlockDataExpiryAfterNotAccessedPeriod

func (mr *MockOptionsMockRecorder) SetBlockDataExpiryAfterNotAccessedPeriod(period interface{}) *gomock.Call

SetBlockDataExpiryAfterNotAccessedPeriod indicates an expected call of SetBlockDataExpiryAfterNotAccessedPeriod

func (*MockOptionsMockRecorder) SetBlockSize

func (mr *MockOptionsMockRecorder) SetBlockSize(value interface{}) *gomock.Call

SetBlockSize indicates an expected call of SetBlockSize

func (*MockOptionsMockRecorder) SetBufferFuture

func (mr *MockOptionsMockRecorder) SetBufferFuture(value interface{}) *gomock.Call

SetBufferFuture indicates an expected call of SetBufferFuture

func (*MockOptionsMockRecorder) SetBufferPast

func (mr *MockOptionsMockRecorder) SetBufferPast(value interface{}) *gomock.Call

SetBufferPast indicates an expected call of SetBufferPast

func (*MockOptionsMockRecorder) SetFutureRetentionPeriod added in v0.8.2

func (mr *MockOptionsMockRecorder) SetFutureRetentionPeriod(value interface{}) *gomock.Call

SetFutureRetentionPeriod indicates an expected call of SetFutureRetentionPeriod

func (*MockOptionsMockRecorder) SetRetentionPeriod

func (mr *MockOptionsMockRecorder) SetRetentionPeriod(value interface{}) *gomock.Call

SetRetentionPeriod indicates an expected call of SetRetentionPeriod

func (*MockOptionsMockRecorder) Validate

func (mr *MockOptionsMockRecorder) Validate() *gomock.Call

Validate indicates an expected call of Validate

type Options

type Options interface {
	// Validate validates the options
	Validate() error

	// Equal returns a flag indicating if the other value is the same as this one
	Equal(value Options) bool

	// SetRetentionPeriod sets how long we intend to keep data in memory
	SetRetentionPeriod(value time.Duration) Options

	// RetentionPeriod returns how long we intend to keep data in memory
	RetentionPeriod() time.Duration

	// SetFutureRetentionPeriod sets how long we intend to keep data in memory
	// in the future if cold writes are enabled.
	SetFutureRetentionPeriod(value time.Duration) Options

	// FutureRetentionPeriod returns how long we intend to keep data in memory
	// in the future if cold writes are enabled.
	FutureRetentionPeriod() time.Duration

	// SetBlockSize sets the blockSize
	SetBlockSize(value time.Duration) Options

	// BlockSize returns the blockSize
	BlockSize() time.Duration

	// SetBufferFuture sets the bufferFuture
	SetBufferFuture(value time.Duration) Options

	// BufferFuture returns the bufferFuture
	BufferFuture() time.Duration

	// SetBufferPast sets the bufferPast
	SetBufferPast(value time.Duration) Options

	// BufferPast returns the bufferPast
	BufferPast() time.Duration

	// SetBlockDataExpiry sets the block data expiry mode
	SetBlockDataExpiry(on bool) Options

	// BlockDataExpiry returns the block data expiry mode
	BlockDataExpiry() bool

	// SetBlockDataExpiryAfterNotAccessedPeriod sets the period that blocks data should
	// be expired after not being accessed for a given duration
	SetBlockDataExpiryAfterNotAccessedPeriod(period time.Duration) Options

	// BlockDataExpiryAfterNotAccessedPeriod returns the period that blocks data should
	// be expired after not being accessed for a given duration
	BlockDataExpiryAfterNotAccessedPeriod() time.Duration
}

Options represents the options for retention

func NewOptions

func NewOptions() Options

NewOptions creates new retention options

Jump to

Keyboard shortcuts

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