posture

package
v0.23.35 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Domain

func Domain() string

func MacAddresses

func MacAddresses() []string

Types

type Cache

type Cache struct {
	DomainFunc func() string
	// contains filtered or unexported fields
}

func NewCache

func NewCache(submitter Submitter, closeNotify <-chan struct{}) *Cache

func (*Cache) AddActiveService

func (cache *Cache) AddActiveService(serviceId string)

func (*Cache) Evaluate added in v0.15.46

func (cache *Cache) Evaluate()

Evaluate refreshes all posture data and determines if new posture responses should be sent out

func (*Cache) GetChangedResponses added in v0.15.46

func (cache *Cache) GetChangedResponses() []rest_model.PostureResponseCreate

GetChangedResponses determines if posture responses should be sent out.

func (*Cache) Refresh

func (cache *Cache) Refresh()

Refresh refreshes posture data

func (*Cache) RemoveActiveService added in v0.15.46

func (cache *Cache) RemoveActiveService(serviceId string)

func (*Cache) SendResponses added in v0.15.46

func (cache *Cache) SendResponses(responses []rest_model.PostureResponseCreate) []error

func (*Cache) SetServiceQueryMap

func (cache *Cache) SetServiceQueryMap(serviceQueryMap map[string]map[string]rest_model.PostureQuery)

SetServiceQueryMap receives of a list of serviceId -> queryId -> queries. Used to determine which queries are necessary to provide data for on a per-service basis.

type CacheData added in v0.15.46

type CacheData struct {
	Processes    cmap.ConcurrentMap[string, ProcessInfo] // map[processPath]ProcessInfo
	MacAddresses []string
	Os           OsInfo
	Domain       string
	Evaluated    atomic.Bool //marks whether posture responses for this data have been sent out
}

func NewCacheData added in v0.15.46

func NewCacheData() *CacheData

type OsInfo

type OsInfo struct {
	Type    string
	Version string
}

func Os

func Os() OsInfo

type ProcessInfo

type ProcessInfo struct {
	IsRunning          bool
	Hash               string
	SignerFingerprints []string
}

func Process

func Process(providedPath string) ProcessInfo

type Submitter added in v0.19.0

type Submitter interface {
	SendPostureResponse(response rest_model.PostureResponseCreate) error
	SendPostureResponseBulk(responses []rest_model.PostureResponseCreate) error
}

Jump to

Keyboard shortcuts

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