Documentation
¶
Overview ¶
Package whlayout is where a webhook source's objects are kept in the managed-resources bucket (#1870): the raw segments in the Hive partition layout the raw table reads, and the names a replica gives the segments it writes. The receiver writes by it, the compactor and retention read by it, and the tables name its prefixes as their locations.
Index ¶
- func CompactedPrefix(source string) string
- func HoldsEvents(key string) bool
- func ManifestKey(source string, start, at time.Time) string
- func PartitionValues(start time.Time) (dt, hh, mm string)
- func RawPrefix(source string) string
- func ReplicaSlug(replica string) string
- func RollupKey(source string, start, at time.Time) string
- func SegmentKey(source string, start time.Time, writer string, seq uint64) string
- func SourcePrefix(source string) string
- func WindowPrefix(source string, start time.Time) string
- type ObjectKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompactedPrefix ¶
CompactedPrefix is the compacted table's external location. Nothing is written under it: every compacted window is registered at the directory of the resource that holds it, so this is only the table's nominal home.
func HoldsEvents ¶ added in v1.146.1
HoldsEvents reports whether an object in a window's directory holds events: a segment or a rollup, not a manifest.
func ManifestKey ¶ added in v1.146.1
ManifestKey is where the list of what a rollup written at at merged is stored, beside it.
func PartitionValues ¶
PartitionValues are the dt, hour and minute values a window is filed under: the UTC date, hour and minute it starts at. A source compacting by the hour files every window under minute 00.
func ReplicaSlug ¶
ReplicaSlug renders a replica identity (host:port) as an object-key segment.
func SegmentKey ¶
SegmentKey is where one segment is written. writer identifies the process (its replica and start time) and seq is its counter, so two replicas, or one replica before and after a restart, never write the same key.
func SourcePrefix ¶
SourcePrefix is where everything a source writes outside the resource store lives, in the managed-resources bucket.
Types ¶
type ObjectKind ¶ added in v1.146.1
type ObjectKind int
ObjectKind is what an object in a window's directory is.
const ( // KindSegment is a segment a receiver wrote. KindSegment ObjectKind = iota // KindRollup is segments merged into one object. KindRollup // KindManifest lists what a rollup merged; it holds no events. KindManifest )
The objects a window's directory holds.