Documentation ¶
Index ¶
- Constants
- func MockInstance(envID, instanceID, consulToken string, dns *DNS, keepAlive time.Duration)
- func Must[T any](obj T, err error) T
- type DNS
- type FC
- type IPSlot
- func (ips *IPSlot) CreateNetwork(ctx context.Context, tracer trace.Tracer, dns *DNS) error
- func (ips *IPSlot) HostSnapshotCIDR() string
- func (ips *IPSlot) HostSnapshotIP() string
- func (ips *IPSlot) HostSnapshotMask() int
- func (ips *IPSlot) NamespaceID() string
- func (ips *IPSlot) NamespaceSnapshotIP() string
- func (ips *IPSlot) Release(ctx context.Context, tracer trace.Tracer) error
- func (ipSlot *IPSlot) RemoveNetwork(ctx context.Context, tracer trace.Tracer, dns *DNS) error
- func (ips *IPSlot) TapCIDR() string
- func (ips *IPSlot) TapIP() string
- func (ips *IPSlot) TapMask() int
- func (ips *IPSlot) TapName() string
- func (ips *IPSlot) VMask() int
- func (ips *IPSlot) VethCIDR() string
- func (ips *IPSlot) VethIP() string
- func (ips *IPSlot) VethName() string
- func (ips *IPSlot) VpeerCIDR() string
- func (ips *IPSlot) VpeerIP() string
- func (ips *IPSlot) VpeerName() string
- type Instance
- type InstanceConfig
- type InstanceFiles
- type MmdsMetadata
Constants ¶
View Source
const ( BuildIDName = "build_id" RootfsName = "rootfs.ext4" SnapfileName = "snapfile" MemfileName = "memfile" BuildDirName = "builds" EnvInstancesDirName = "env-instances" )
View Source
const ( // This is the maximum number of IP addresses that can be allocated. IPSlotsSize = octetSize * octetSize HostSnapshotMask = 32 VMask = 30 TapMask = 30 )
We are using a more debuggable IP address allocation for now that only covers 255 addresses.
Variables ¶
This section is empty.
Functions ¶
func MockInstance ¶
Types ¶
type FC ¶
type FC struct {
// contains filtered or unexported fields
}
func NewFC ¶
func NewFC( ctx context.Context, tracer trace.Tracer, slot *IPSlot, fsEnv *InstanceFiles, mmdsMetadata *MmdsMetadata, ) *FC
type IPSlot ¶
type IPSlot struct { ConsulToken string InstanceID string NodeShortID string KVKey string SlotIdx int }
func (*IPSlot) CreateNetwork ¶
func (*IPSlot) HostSnapshotCIDR ¶
func (*IPSlot) HostSnapshotIP ¶
func (*IPSlot) HostSnapshotMask ¶
func (*IPSlot) NamespaceID ¶
func (*IPSlot) NamespaceSnapshotIP ¶
func (*IPSlot) RemoveNetwork ¶
type Instance ¶
type Instance struct { Files *InstanceFiles Slot *IPSlot FC *FC EnvID string // contains filtered or unexported fields }
func NewInstance ¶
func (*Instance) CleanupAfterFCStop ¶
type InstanceConfig ¶
type InstanceConfig struct { EnvID string AllocID string NodeID string ConsulToken string EnvsDisk string InstanceID string LogsProxyAddress string TraceID string TeamID string KernelVersion string KernelMountDir string KernelsDir string KernelName string FirecrackerBinaryPath string UFFDBinaryPath string HugePages bool }
Click to show internal directories.
Click to hide internal directories.