workloadcache

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(connectionID string) (Snapshot, bool)
	Put(connectionID string, workloads []model.Workload, observedAt time.Time)
	Delete(connectionID string)
}

Cache stores workload inventory by connection. Implementations may keep the inventory in memory or persist it in another store without changing the server or API layers.

type Memory

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

func NewMemory

func NewMemory() *Memory

func (*Memory) Delete

func (m *Memory) Delete(connectionID string)

func (*Memory) Get

func (m *Memory) Get(connectionID string) (Snapshot, bool)

func (*Memory) Put

func (m *Memory) Put(connectionID string, workloads []model.Workload, observedAt time.Time)

type Snapshot

type Snapshot struct {
	ConnectionID string
	Workloads    []model.Workload
	ObservedAt   time.Time
}

Jump to

Keyboard shortcuts

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