Documentation ¶
Overview ¶
Package state provides the persistent storage layer for component states.
Index ¶
- Constants
- func Compact(ctx context.Context, db *sql.DB) error
- func ConvertToTableName(name string) string
- func CreateAPIVersionTable(ctx context.Context, db *sql.DB) error
- func CreateMachineIDIfNotExist(ctx context.Context, db *sql.DB, providedUID string) (string, time.Time, error)
- func CreateTable(ctx context.Context, db *sql.DB) error
- func GetComponents(ctx context.Context, db *sql.DB, machineID string) (string, error)
- func GetLoginInfo(ctx context.Context, db *sql.DB, machineID string) (string, error)
- func Open(file string) (*sql.DB, 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
Constants ¶
View Source
const ( TableNameAPIVersion = "api_version" ColumnAPIVersion = "version" )
View Source
const ( TableNameMachineMetadata = "machine_metadata" ColumnMachineID = "machine_id" ColumnUnixSeconds = "unix_seconds" ColumnToken = "token" ColumnComponents = "components" )
Variables ¶
This section is empty.
Functions ¶
func ConvertToTableName ¶
func GetComponents ¶
func GetLoginInfo ¶
func Register ¶
func Register(reg *prometheus.Registry) error
func UpdateAPIVersion ¶
func UpdateComponents ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.