history

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitHistory added in v0.12.0

func InitHistory(db *bbolt.DB) error

InitHistory loads the osquery instance history from bbolt DB if exists, sets up bucket if it does not

Types

type ExpectedAtLeastOneRowError

type ExpectedAtLeastOneRowError struct{}

func (ExpectedAtLeastOneRowError) Error

type History

type History struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type Instance

type Instance struct {
	StartTime   string
	ConnectTime string
	ExitTime    string
	Hostname    string
	InstanceId  string
	Version     string
	Error       string
}

func GetHistory

func GetHistory() ([]Instance, error)

GetHistory returns the last 10 instances of osquery started / restarted by launcher, each start / restart cycle is an entry

func LatestInstance

func LatestInstance() (Instance, error)

LatestInstance returns the latest osquery instance

func NewInstance

func NewInstance() (*Instance, error)

NewInstance adds a new instance to the osquery instance history and returns it

func (*Instance) Connected

func (i *Instance) Connected(querier Querier) error

Connected sets the connect time and instance id of the current osquery instance

func (*Instance) Exited

func (i *Instance) Exited(exitError error) error

InstanceExited sets the exit time and appends provided error (if any) to current osquery instance

type NoDbError added in v0.12.0

type NoDbError struct{}

func (NoDbError) Error added in v0.12.0

func (e NoDbError) Error() string

type NoInstancesError

type NoInstancesError struct{}

func (NoInstancesError) Error

func (c NoInstancesError) Error() string

type Querier

type Querier interface {
	Query(query string) ([]map[string]string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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