Documentation ¶
Overview ¶
Package state provides the persistent storage layer for component states.
Index ¶
- Constants
- func Compact(ctx context.Context, db *sql.DB) error
- func CreateMachineIDIfNotExist(ctx context.Context, db *sql.DB, providedUID string) (string, error)
- func CreateTableAPIVersion(ctx context.Context, db *sql.DB) error
- func CreateTableBootIDs(ctx context.Context, db *sql.DB) error
- func CreateTableMachineMetadata(ctx context.Context, db *sql.DB) error
- func GetComponents(ctx context.Context, db *sql.DB, machineID string) (string, error)
- func GetFirstBootID(ctx context.Context, db *sql.DB) (string, error)
- func GetLastBootID(ctx context.Context, db *sql.DB) (string, error)
- func GetLoginInfo(ctx context.Context, db *sql.DB, machineID string) (string, error)
- func InsertBootID(ctx context.Context, db *sql.DB, bootID string, time time.Time) error
- func ReadAPIVersion(ctx context.Context, db *sql.DB) (string, error)
- func RecordMetrics(ctx context.Context, db *sql.DB) error
- func Register(reg *prometheus.Registry) error
- func UpdateAPIVersion(ctx context.Context, db *sql.DB, apiVersion string) error
- func UpdateAPIVersionIfNotExists(ctx context.Context, db *sql.DB, apiVersion string) (string, error)
- func UpdateComponents(ctx context.Context, db *sql.DB, machineID string, components string) error
- func UpdateLoginInfo(ctx context.Context, db *sql.DB, machineID string, token string) error
- type RebootEvent
Constants ¶
View Source
const ( TableNameAPIVersion = "api_version" ColumnAPIVersion = "version" )
View Source
const ( TableNameMachineBootIDs = "machine_boot_ids" ColumnBootID = "boot_id" ColumnBootUnixSeconds = "boot_unix_seconds" )
View Source
const ( TableNameMachineMetadata = "machine_metadata" ColumnMachineID = "machine_id" ColumnUnixSeconds = "unix_seconds" ColumnToken = "token" ColumnComponents = "components" )
Variables ¶
This section is empty.
Functions ¶
func CreateTableAPIVersion ¶ added in v0.1.6
func CreateTableBootIDs ¶ added in v0.3.5
func CreateTableMachineMetadata ¶ added in v0.1.6
func GetComponents ¶
func GetFirstBootID ¶ added in v0.3.5
func GetLastBootID ¶ added in v0.3.5
Returns an empty string and no error if no boot ID is found.
func GetLoginInfo ¶
func InsertBootID ¶ added in v0.3.5
func Register ¶
func Register(reg *prometheus.Registry) error
func UpdateAPIVersion ¶
func UpdateComponents ¶
Types ¶
type RebootEvent ¶ added in v0.3.5
func GetRebootEvents ¶ added in v0.3.5
Reboot events are events where the boot ID changed.
Click to show internal directories.
Click to hide internal directories.