settings

package
v1.6.19 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CServiceName     = "HLS"
	CServiceFullName = "hidden-lake-service"
)
View Source
const (
	CNetworkMask = uint32(0x5f67705f) // bytes_prefix: _gp_
	CServiceMask = uint32(0x5f686c5f) // bytes_prefix: _hl_
)
View Source
const (
	CPathKey = "hls.key"
	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 (
	CDefaultMessageSize     = (8 << 10) // 8192-B
	CDefaultKeySize         = (4 << 10) // 4096-b
	CDefaultFetchTimeout    = 60_000    // 60 seconds
	CDefaultQueuePeriod     = 5_000     // 5 seconds
	CDefaultWorkSize        = 0         // bits
	CDefaultRandQueuePeriod = 0         // 0 seconds
	CDefaultRandMessageSize = 0         // 0 bytes
	CDefaultF2FDisabled     = false     // friend-to-friend
	CDefaultNetworkKey      = ""
)
View Source
const (
	CDefaultTCPAddress  = "127.0.0.1:9571"
	CDefaultHTTPAddress = "127.0.0.1:9572"
)
View Source
const (
	CQueueMainPoolCapacity = (1 << 8) // 256 messages ~= 2MiB
	CQueueRandPoolCapacity = (1 << 5) //  32 messages ~= 256KiB
)
View Source
const (
	CNetworkQueueCapacity = (2 << 10) // 2048 hashes ~= 64KiB
	CNetworkMaxConns      = (1 << 8)  // 256 conns
	CNetworkWriteTimeout  = 5 * time.Second
	CNetworkReadTimeout   = 5 * time.Second
)
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