Documentation ¶
Overview ¶
Package retention is a generated GoMock package.
Index ¶
- func FlushTimeEnd(opts Options, t time.Time) time.Time
- func FlushTimeEndForBlockSize(blockSize time.Duration, t time.Time) time.Time
- func FlushTimeStart(opts Options, t time.Time) time.Time
- func FlushTimeStartForRetentionPeriod(retentionPeriod time.Duration, blockSize time.Duration, t time.Time) time.Time
- type Configuration
- type MockOptions
- func (m *MockOptions) BlockDataExpiry() bool
- func (m *MockOptions) BlockDataExpiryAfterNotAccessedPeriod() time.Duration
- func (m *MockOptions) BlockSize() time.Duration
- func (m *MockOptions) BufferFuture() time.Duration
- func (m *MockOptions) BufferPast() time.Duration
- func (m *MockOptions) EXPECT() *MockOptionsMockRecorder
- func (m *MockOptions) Equal(value Options) bool
- func (m *MockOptions) RetentionPeriod() time.Duration
- func (m *MockOptions) SetBlockDataExpiry(on bool) Options
- func (m *MockOptions) SetBlockDataExpiryAfterNotAccessedPeriod(period time.Duration) Options
- func (m *MockOptions) SetBlockSize(value time.Duration) Options
- func (m *MockOptions) SetBufferFuture(value time.Duration) Options
- func (m *MockOptions) SetBufferPast(value time.Duration) Options
- func (m *MockOptions) SetRetentionPeriod(value time.Duration) Options
- func (m *MockOptions) Validate() error
- type MockOptionsMockRecorder
- func (mr *MockOptionsMockRecorder) BlockDataExpiry() *gomock.Call
- func (mr *MockOptionsMockRecorder) BlockDataExpiryAfterNotAccessedPeriod() *gomock.Call
- func (mr *MockOptionsMockRecorder) BlockSize() *gomock.Call
- func (mr *MockOptionsMockRecorder) BufferFuture() *gomock.Call
- func (mr *MockOptionsMockRecorder) BufferPast() *gomock.Call
- func (mr *MockOptionsMockRecorder) Equal(value interface{}) *gomock.Call
- func (mr *MockOptionsMockRecorder) RetentionPeriod() *gomock.Call
- func (mr *MockOptionsMockRecorder) SetBlockDataExpiry(on interface{}) *gomock.Call
- func (mr *MockOptionsMockRecorder) SetBlockDataExpiryAfterNotAccessedPeriod(period interface{}) *gomock.Call
- func (mr *MockOptionsMockRecorder) SetBlockSize(value interface{}) *gomock.Call
- func (mr *MockOptionsMockRecorder) SetBufferFuture(value interface{}) *gomock.Call
- func (mr *MockOptionsMockRecorder) SetBufferPast(value interface{}) *gomock.Call
- func (mr *MockOptionsMockRecorder) SetRetentionPeriod(value interface{}) *gomock.Call
- func (mr *MockOptionsMockRecorder) Validate() *gomock.Call
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlushTimeEnd ¶
FlushTimeEnd is the latest flushable time
func FlushTimeEndForBlockSize ¶
FlushTimeEndForBlockSize is the latest flushable time
func FlushTimeStart ¶
FlushTimeStart is the earliest flushable time
Types ¶
type Configuration ¶
type Configuration struct { RetentionPeriod time.Duration `yaml:"retentionPeriod" 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) 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) SetRetentionPeriod ¶
func (m *MockOptions) SetRetentionPeriod(value time.Duration) Options
SetRetentionPeriod 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) 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) 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 // 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