timestamp

package
v1.15.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCTCurTime

func GetCTCurTime(clockSource *models.ClockSource) (uint64, error)

Returns current time in units that are used for timestamps in CT and NAT maps (seconds for ClockSourceModeKtime and scaled jiffies for ClockSourceModeJiffies).

func GetClockSourceFromAgent

func GetClockSourceFromAgent(svc daemon.ClientService) (*models.ClockSource, error)

Connect to the agent via API and get its current clocksource.

func GetClockSourceFromOptions

func GetClockSourceFromOptions() *models.ClockSource

Get current clocksource - to be used in the agent context.

func GetClockSourceFromRuntimeConfig

func GetClockSourceFromRuntimeConfig() (*models.ClockSource, error)

Get the clocksource from the agent config file in case agent is not running.

Types

type TimestampConverter

type TimestampConverter func(timestamp uint64) uint64

func NewCTTimeToSecConverter

func NewCTTimeToSecConverter(clockSource *models.ClockSource) (TimestampConverter, error)

Returns a function that converts a CT timestamp from clocksource units into seconds.

Jump to

Keyboard shortcuts

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