settings

package
v1.6.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CServiceName     = "HLS"
	CServiceFullName = "hidden-lake-service"
)
View Source
const (
	CServiceMask = uint32(0x1750571)
	CNetworkMask = uint64(0x676F2D7065657201) // bytes_prefix: go-peer
)
View Source
const (
	CPathYML = "hls.yml"
	CPathDB  = "hls.db"
)
View Source
const (
	CHeaderPublicKey    = "Hl-Service-Public-Key"
	CHeaderResponseMode = "Hl-Service-Response-Mode"
)
View Source
const (
	CHeaderResponseModeON  = "on" // default
	CHeaderResponseModeOFF = "off"
)
View Source
const (
	CRetryEnqueue   = 2
	CFetchTimeRatio = 10
)
View Source
const (
	CDefaultMessageSize     = (8 << 10) // 8KiB
	CDefaultWorkSize        = 22        // bits
	CDefaultKeySize         = 4096      // bits
	CDefaultQueuePeriod     = 5000      // 5 seconds
	CDefaultQueueRandPeriod = 0         // 0 seconds
	CDefaultLimitVoidSize   = (4 << 10) // 4KiB
	CDefaultF2FDisabled     = false     // friend-to-friend
	CDefaultNetworkKey      = "default"
)
View Source
const (
	CDefaultTCPAddress  = "127.0.0.1:9571"
	CDefaultHTTPAddress = "127.0.0.1:9572"
)
View Source
const (
	CQueueMainCapacity = (1 << 8) // 256 messages ~= 2MiB
	CQueueVoidCapacity = (1 << 5) //  32 messages ~= 256KiB
)
View Source
const (
	CNetworkQueueCapacity = (2 << 10) // 2048 hashes ~= 64KiB
	CNetworkMaxConns      = (1 << 8)  // 256 conns
)
View Source
const (
	CConnKeeperDuration  = 10 * time.Second
	CConnDialTimeout     = 30 * time.Second
	CConnWaitReadTimeout = time.Hour
)
View Source
const (
	CHandleIndexPath          = "/api/index"
	CHandleConfigSettingsPath = "/api/config/settings"
	CHandleConfigConnectsPath = "/api/config/connects"
	CHandleConfigFriendsPath  = "/api/config/friends"
	CHandleNetworkOnlinePath  = "/api/network/online"
	CHandleNetworkRequestPath = "/api/network/request"
	CHandleNetworkPubKeyPath  = "/api/network/pubkey"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SFriend

type SFriend struct {
	FAliasName string `json:"alias_name"`
	FPublicKey string `json:"public_key"`
}

type SRequest added in v1.5.6

type SRequest struct {
	FReceiver string            `json:"receiver"` // alias_name
	FReqData  *request.SRequest `json:"req_data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL