Documentation
¶
Index ¶
- type BundleMetadata
- type Cache
- func (c *Cache) GetAlias(name string) (string, error)
- func (c *Cache) GetBundle(url, checksum string) (string, error)
- func (c *Cache) GetLatestAgentMetadata() (*LatestAgentMetadata, error)
- func (c *Cache) IsLatestAgentStale() bool
- func (c *Cache) ListAliases() (map[string]string, error)
- func (c *Cache) RemoveAlias(name string) error
- func (c *Cache) SetAlias(name, url string) error
- func (c *Cache) SetLatestAgentMetadata(metadata *LatestAgentMetadata) error
- func (c *Cache) StoreBundle(url, checksum string, reader io.Reader, size int64) (string, error)
- func (c *Cache) StoreBundleWithVersion(url, checksum string, reader io.Reader, size int64, version string) (string, error)
- type LatestAgentMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleMetadata ¶
type BundleMetadata struct {
URL string `json:"url"`
Version string `json:"version,omitempty"` // Version tag (e.g., "agent-claude-v0.3.0")
Checksum string `json:"checksum"`
Size int64 `json:"size"`
CachedAt int64 `json:"cached_at"`
FetchedAt int64 `json:"fetched_at,omitempty"` // When this version was fetched (for staleness check)
}
BundleMetadata stores information about a cached bundle
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache manages agent bundle storage and aliases
func (*Cache) GetLatestAgentMetadata ¶
func (c *Cache) GetLatestAgentMetadata() (*LatestAgentMetadata, error)
GetLatestAgentMetadata retrieves the cached latest agent metadata
func (*Cache) IsLatestAgentStale ¶
IsLatestAgentStale checks if the cached latest agent metadata is stale Returns true if metadata is missing, older than 24 hours, or has empty version
func (*Cache) ListAliases ¶
ListAliases returns all configured aliases
func (*Cache) RemoveAlias ¶
RemoveAlias removes an alias
func (*Cache) SetLatestAgentMetadata ¶
func (c *Cache) SetLatestAgentMetadata(metadata *LatestAgentMetadata) error
SetLatestAgentMetadata stores the latest agent metadata
func (*Cache) StoreBundle ¶
StoreBundle stores a downloaded bundle in the cache
type LatestAgentMetadata ¶
type LatestAgentMetadata struct {
Version string `json:"version"` // Version tag (e.g., "agent-claude-v0.3.0")
URL string `json:"url"` // Download URL
Checksum string `json:"checksum"` // SHA256 checksum
FetchedAt int64 `json:"fetched_at"` // When this was fetched (for staleness check)
}
LatestAgentMetadata stores metadata about the latest known agent version
Click to show internal directories.
Click to hide internal directories.