data

package
v1.0.50 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKey

func GetKey(entityType string, keyPart ...string) string

GetKey returns a key to be used in the storage system

Types

type LogState

type LogState struct {
	Unit       string    `json:"unit"`
	LastCursor string    `json:"last_cursor"`
	LastSynced time.Time `json:"last_synced"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is the data manager

func NewManager

func NewManager(systemdbpath string) (*Manager, error)

NewManager creates a new instance of a Manager and returns it

func (Manager) Close

func (store Manager) Close() error

Close closes the data Manager

func (Manager) GetLogStateForAllUnits

func (store Manager) GetLogStateForAllUnits() ([]LogState, error)

GetLogStateForAllUnits gets log state for all units

func (Manager) GetLogStateForUnit

func (store Manager) GetLogStateForUnit(unit string) (LogState, error)

GetLogStateForUnit gets log state for a given unit

func (Manager) UpdateLogState

func (store Manager) UpdateLogState(unit, lastCursor string) (LogState, error)

UpdateLogState updates the log state for a given unit

Jump to

Keyboard shortcuts

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