Documentation
¶
Overview ¶
Package metering emits append-only VM/snapshot lifecycle endpoints; tenant attribution lives upstream. Recorder is the contract; backends live in subpackages (file, stderr, capture).
Index ¶
Constants ¶
View Source
const ( KindVMComputeStart Kind = "vm.compute.start" KindVMComputeStop Kind = "vm.compute.stop" KindVMStorageStart Kind = "vm.storage.start" KindVMStorageStop Kind = "vm.storage.stop" KindSnapStorageStart Kind = "snap.storage.start" KindSnapStorageStop Kind = "snap.storage.stop" ReasonBoot Reason = "boot" ReasonRestart Reason = "restart" ReasonClone Reason = "clone" ReasonRestore Reason = "restore" ReasonHibernateWake Reason = "hibernate-wake" ReasonStopUser Reason = "stop-user" ReasonStopCrash Reason = "stop-crash" ReasonVMRemove Reason = "vm-rm" ReasonSnapRemove Reason = "snap-rm" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Kind Kind `json:"kind"`
VMID string `json:"vm_id,omitempty"`
SnapshotID string `json:"snapshot_id,omitempty"`
SourceSnapshotID string `json:"source_snapshot_id,omitempty"`
Reason Reason `json:"reason,omitempty"`
Hypervisor string `json:"hypervisor,omitempty"`
Shape Shape `json:"shape"`
EmittedAt time.Time `json:"emitted_at"`
}
Entry is one append-only lifecycle event.
type Kind ¶
type Kind string
Kind identifies a lifecycle endpoint; downstream pairs *.start with *.stop by id.
type NopRecorder ¶
type NopRecorder struct{}
NopRecorder discards every entry; zero value is usable.
Click to show internal directories.
Click to hide internal directories.