settings

package
v1.5.13 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CServiceName  = "HLS"
	CTitlePattern = "go-peer/hidden-lake-service"
)
View Source
const (
	CServiceMask = uint32(0x1750571)
	CNetworkMask = uint64(0x676F2D7065657201)
)
View Source
const (
	CPathCFG = "hls.cfg"
	CPathDB  = "hls.db"
)
View Source
const (
	CHeaderPublicKey   = "Service-Public-Key"
	CHeaderMessageHash = "Service-Message-Hash"
	CHeaderOffResponse = "Service-Off-Response"
)
View Source
const (
	CRetryEnqueue = 2
	CFetchTimeout = time.Minute
)
View Source
const (
	CDefaultMessageSize = (1 << 20) // 1MiB
	CDefaultWorkSize    = 20        // bits
	CDefaultKeySize     = 4096      // bits
	CDefaultQueuePeriod = 5000      // 5seconds
)
View Source
const (
	CQueueCapacity     = (1 << 6) // messages in queue
	CQueuePoolCapacity = (1 << 5) // generated fake messages
)
View Source
const (
	CNetworkWriteTimeout = time.Minute
	CNetworkCapacity     = (1 << 10) // hashes
	CNetworkMaxConns     = (1 << 6)  // 64
)
View Source
const (
	CConnLimitVoidSize    = (1 << 20) // 1MiB
	CConnWaitReadDeadline = time.Hour
	CConnReadDeadline     = time.Minute
	CConnWriteDeadline    = time.Minute
	CConnKeeperDuration   = 10 * time.Second
)
View Source
const (
	CHandleIndexPath          = "/api/index"
	CHandleConfigConnectsPath = "/api/config/connects"
	CHandleConfigFriendsPath  = "/api/config/friends"
	CHandleNetworkOnlinePath  = "/api/network/online"
	CHandleNetworkRequestPath = "/api/network/request"
	CHandleNetworkMessagePath = "/api/network/message"
	CHandleNodeKeyPath        = "/api/node/key"
)
View Source
const (
	CHandleIndexTemplate          = "%s" + CHandleIndexPath
	CHandleConfigConnectsTemplate = "%s" + CHandleConfigConnectsPath
	CHandleConfigFriendsTemplate  = "%s" + CHandleConfigFriendsPath
	CHandleNetworkOnlineTemplate  = "%s" + CHandleNetworkOnlinePath
	CHandleNetworkRequestTemplate = "%s" + CHandleNetworkRequestPath
	CHandleNetworkMessageTemplate = "%s" + CHandleNetworkMessagePath
	CHandleNodeKeyTemplate        = "%s" + CHandleNodeKeyPath
)
View Source
const (
	// INFO
	CLogInfoOffResponseFromService logbuilder.ILogType = "OFRSP"
	CLogInfoResponseFromService    logbuilder.ILogType = "RSPSR"

	// WARN
	CLogWarnRequestToService logbuilder.ILogType = "RQTSR"
	CLogWarnUndefinedService logbuilder.ILogType = "UNDSR"

	// ERRO
	CLogErroLoadRequestType  logbuilder.ILogType = "LDRQT"
	CLogErroProxyRequestType logbuilder.ILogType = "PXRQT"
)

Variables

This section is empty.

Functions

func InitClient

func InitClient(pSett message.ISettings, pPrivKey asymmetric.IPrivKey) client.IClient

Types

type SConnect

type SConnect = string

type SFriend

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

type SMessage added in v1.5.8

type SMessage = string

type SPrivKey

type SPrivKey = string

type SRequest added in v1.5.6

type SRequest struct {
	FReceiver string `json:"receiver"` // public key
	FHexData  string `json:"hex_data"` // data in hex encode
}

Jump to

Keyboard shortcuts

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