Documentation
¶
Index ¶
- Constants
- func Main([]string) error
- func Version() string
- type CreateSessionRequest
- type CreateSessionResponse
- type HealthResponse
- type PageCache
- func (c *PageCache) Add(cacheKey string, offset int64, data []byte)
- func (c *PageCache) Borrow(cacheKey string, offset int64, size int) ([]byte, bool)
- func (c *PageCache) Get(cacheKey string, offset int64, size int) ([]byte, bool)
- func (c *PageCache) SnapshotStats() (bytes, maxBytes int64, items int, hits, misses int64)
- func (c *PageCache) SnapshotTimingStats() (shards int, lookupNanos, lookupMaxNanos, addNanos, addMaxNanos int64)
- type Stats
- type Supervisor
- func (s *Supervisor) CloseSession(context.Context, string) error
- func (s *Supervisor) CloseSessionVersion(context.Context, string, string) error
- func (s *Supervisor) CreateSession(context.Context, CreateSessionRequest) (*CreateSessionResponse, error)
- func (s *Supervisor) HealthVersion(context.Context, string) (*HealthResponse, error)
- func (s *Supervisor) Stats(context.Context) (*Stats, error)
- func (s *Supervisor) VersionKey() string
Constants ¶
View Source
const ( BackendFile = "file" BackendUFFD = "uffd" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateSessionRequest ¶
type CreateSessionRequest struct {
SessionID string `json:"session_id,omitempty"`
InstanceID string `json:"instance_id"`
BackingMemoryPath string `json:"backing_memory_path"`
CacheKey string `json:"cache_key"`
}
CreateSessionRequest describes one Firecracker UFFD restore session.
type CreateSessionResponse ¶
type CreateSessionResponse struct {
SessionID string `json:"session_id"`
UFFDSocketPath string `json:"uffd_socket_path"`
PagerVersion string `json:"pager_version"`
}
CreateSessionResponse returns the per-session socket Firecracker should use as mem_backend.backend_path.
type HealthResponse ¶
type PageCache ¶
type PageCache struct {
// contains filtered or unexported fields
}
func NewPageCache ¶
func (*PageCache) Borrow ¶
Borrow returns the immutable cached page without copying or touching LRU state.
func (*PageCache) SnapshotStats ¶
func (*PageCache) SnapshotTimingStats ¶
type Stats ¶
type Stats struct {
Version string `json:"version"`
Draining bool `json:"draining"`
ActiveSessions int `json:"active_sessions"`
CacheBytes int64 `json:"cache_bytes"`
CacheMax int64 `json:"cache_max"`
CacheItems int `json:"cache_items"`
CacheHits int64 `json:"cache_hits"`
CacheMisses int64 `json:"cache_misses"`
CacheShards int `json:"cache_shards"`
CacheLookupNanos int64 `json:"cache_lookup_nanos"`
CacheLookupMaxNanos int64 `json:"cache_lookup_max_nanos"`
CacheAddNanos int64 `json:"cache_add_nanos"`
CacheAddMaxNanos int64 `json:"cache_add_max_nanos"`
Faults int64 `json:"faults"`
BackingBytesRead int64 `json:"backing_bytes_read"`
Copies int64 `json:"copies"`
CopyErrors int64 `json:"copy_errors"`
ActiveFaults int64 `json:"active_faults"`
MaxConcurrentFaults int64 `json:"max_concurrent_faults"`
FaultNanos int64 `json:"fault_nanos"`
FaultMaxNanos int64 `json:"fault_max_nanos"`
ReadPageNanos int64 `json:"read_page_nanos"`
ReadPageMaxNanos int64 `json:"read_page_max_nanos"`
BackingReadNanos int64 `json:"backing_read_nanos"`
BackingReadMaxNanos int64 `json:"backing_read_max_nanos"`
CopyNanos int64 `json:"copy_nanos"`
CopyMaxNanos int64 `json:"copy_max_nanos"`
}
type Supervisor ¶
type Supervisor struct{}
func NewSupervisor ¶
func (*Supervisor) CloseSession ¶
func (s *Supervisor) CloseSession(context.Context, string) error
func (*Supervisor) CloseSessionVersion ¶
func (*Supervisor) CreateSession ¶
func (s *Supervisor) CreateSession(context.Context, CreateSessionRequest) (*CreateSessionResponse, error)
func (*Supervisor) HealthVersion ¶
func (s *Supervisor) HealthVersion(context.Context, string) (*HealthResponse, error)
func (*Supervisor) VersionKey ¶
func (s *Supervisor) VersionKey() string
Click to show internal directories.
Click to hide internal directories.