Documentation
¶
Index ¶
- func CleanupStaleContainers()
- func ContainerDir(ctName string) string
- func CreateContainer(sessionID string) (string, string, error)
- func CreateRemnuxContainer(fileID string, fileBytes []byte) (string, error)
- func EnsureRemnuxNetwork(ctx context.Context, cli *client.Client) error
- func GetContainerInternalAddress(ctName string) (string, error)
- func GetContainerWebURL(ctName string) (string, error)
- func ListSessionContainers(sessionID string) ([]string, error)
- func PullImage() error
- func ReadDownload(ctName, filename string) ([]byte, error)
- func RecordActivity(ctName string)
- func RecordConnectionClosed(ctName string)
- func RecordConnectionOpened(ctName string)
- func StartCleanupLoop()
- func StartSystem()
- func StopContainer(ctName string) error
- func StopRemnuxContainer(ctName string) error
- type FileEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupStaleContainers ¶
func CleanupStaleContainers()
CleanupStaleContainers stops containers that exceed their time limits.
func ContainerDir ¶
ContainerDir returns the host path to a container's download directory.
func CreateContainer ¶
CreateContainer creates a new container for a session with a per-container download directory.
func CreateRemnuxContainer ¶
CreateRemnuxContainer creates a REMnux analysis container with the file copied in.
func EnsureRemnuxNetwork ¶
EnsureRemnuxNetwork creates the isolated network for REMnux containers.
func GetContainerInternalAddress ¶
GetContainerInternalAddress returns the address for reaching a download container. Uses the published host port, which works whether the server is on the host or in a container.
func GetContainerWebURL ¶
GetContainerWebURL returns the HTTP URL for the container's web interface via its published port.
func ListSessionContainers ¶
ListSessionContainers returns container names for a session.
func ReadDownload ¶
ReadDownload reads a file from the container's download directory.
func RecordActivity ¶
func RecordActivity(ctName string)
RecordActivity records that a user is actively using the container (called on each file list/submit request).
func RecordConnectionClosed ¶
func RecordConnectionClosed(ctName string)
RecordConnectionClosed decrements the active connection count and records the disconnection time when no more connections remain.
func RecordConnectionOpened ¶
func RecordConnectionOpened(ctName string)
RecordConnectionOpened increments the active connection count for a container.
func StartCleanupLoop ¶
func StartCleanupLoop()
StartCleanupLoop runs a background goroutine that periodically checks for stale containers.
func StartSystem ¶
func StartSystem()
StartSystem initializes the container system (starts idle cleanup loop).
func StopContainer ¶
StopContainer stops, removes the container, and cleans up its download directory.
func StopRemnuxContainer ¶
StopRemnuxContainer stops and removes a REMnux container.