Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndPolicy ¶
type AndPolicy interface { BinaryPolicy }
AndPolicy is a Policy from which both Policies must request that messages be retained in order to do so
type BinaryPolicy ¶
BinaryPolicy is a Policy where two Policies are combined in order to determine retention policy
type ConsumedPolicy ¶
type ConsumedPolicy interface { Policy }
ConsumedPolicy describes a Policy that discards messages that have been consumed by all active Consumers
func MakeConsumedPolicy ¶
func MakeConsumedPolicy() ConsumedPolicy
MakeConsumedPolicy returns a Policy that allows for the discarding of messages that have already been consumed by active Consumers
type CountedPolicy ¶
CountedPolicy describes a Policy that only retains the most recent specified Count of messages
func MakeCountedPolicy ¶
func MakeCountedPolicy(c Count) CountedPolicy
MakeCountedPolicy returns a Policy that only retains the most recent specified count of messages
type EntriesStatistics ¶
type EntriesStatistics struct { FirstOffset Offset LastOffset Offset FirstTimestamp time.Time LastTimestamp time.Time }
EntriesStatistics provides Retention information about a range of Log entries
type LogStatistics ¶
LogStatistics provides Retention information about the Log
type NotPolicy ¶
type NotPolicy interface { UnaryPolicy }
NotPolicy is a Policy that negates the retention logic of its supplied Policy
type OrPolicy ¶
type OrPolicy interface { BinaryPolicy }
OrPolicy is a Policy from which either Policy can request that messages be retained in order to do so
type PermanentPolicy ¶
type PermanentPolicy interface { Policy }
PermanentPolicy describes a Policy where all messages are retained without consideration.
func MakePermanentPolicy ¶
func MakePermanentPolicy() PermanentPolicy
MakePermanentPolicy returns a Policy where all messages are retained without consideration
type Policy ¶
type Policy interface { InitialState() State Retain(State, *Statistics) (State, bool) }
Policy describes and implements a policy that a Topic will use to discard messages
type Statistics ¶
type Statistics struct { CurrentTime time.Time Log *LogStatistics Entries *EntriesStatistics }
Statistics provides just enough information about the Log and a range entries to be useful to a Policy
type TimedPolicy ¶
TimedPolicy describes a Policy that only retains messages retains messages produced in the last specified Duration
func MakeTimedPolicy ¶
func MakeTimedPolicy(d time.Duration) TimedPolicy
MakeTimedPolicy returns a Policy that only retains messages produced in the last specified Duration
type UnaryPolicy ¶
UnaryPolicy is a Policy that applies some additional logic to a supplied Policy