Documentation
¶
Index ¶
Constants ¶
View Source
const ( GRPCMaxMsgSize = 20 * 1024 * 1024 // 20 MiB - max gRPC message size GRPCStreamBuffer = 16 * 1024 * 1024 // 16 MiB - buffer for streaming reads GRPCOverheadRoom = GRPCMaxMsgSize - GRPCStreamBuffer // 4 MiB headroom )
gRPC message size limits IMPORTANT: GRPCStreamBuffer MUST be smaller than GRPCMaxMsgSize to leave room for protobuf framing overhead (~10-20 bytes per message)
View Source
const BlockSize = 4 * 1024 * 1024 // 4 MiB - larger chunks = fewer gRPC round-trips over WAN
View Source
const DefaultRelay = "https://keibidroprelay.keibisoft.com/"
View Source
const InboundPort = 26431
View Source
const OutboundPort = 26432
Variables ¶
This section is empty.
Functions ¶
func ConfigDir ¶
func ConfigDir() string
ConfigDir returns the config directory path (~/.config/keibidrop/).
func EnsureDirectories ¶
EnsureDirectories creates save_path, mount_path, and log directory if they don't exist.
func WriteDefault ¶
func WriteDefault() error
WriteDefault creates a default config file with comments at the standard path. Does nothing if the file already exists.
Types ¶
type Config ¶
type Config struct {
Relay string `toml:"relay"`
SavePath string `toml:"save_path"`
MountPath string `toml:"mount_path"`
LogFile string `toml:"log_file"`
InboundPort int `toml:"inbound_port"`
OutboundPort int `toml:"outbound_port"`
BridgeAddr string `toml:"bridge_addr"` // TCP bridge relay address
StrictMode bool `toml:"strict_mode"` // Disable data relay fallback
NoFUSE bool `toml:"no_fuse"`
PrefetchOnOpen bool `toml:"prefetch_on_open"`
PushOnWrite bool `toml:"push_on_write"`
}
Config holds all user-configurable settings. Resolution order: built-in defaults → config file → environment variables.
Click to show internal directories.
Click to hide internal directories.