settings

package
v1.5.16 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 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   = (8 << 10) // 8KiB
	CDefaultWorkSize      = 20        // bits
	CDefaultKeySize       = 4096      // bits
	CDefaultQueuePeriod   = 5000      // 5seconds
	CDefaultLimitVoidSize = (4 << 10) // 4KiB
)
View Source
const (
	CDefaultTCPAddress        = "127.0.0.1:9571"
	CDefaultHTTPAddress       = "127.0.0.1:9572"
	CDefaultServiceHLMAddress = "127.0.0.1:9592"
)
View Source
const (
	CQueueCapacity     = (1 << 6) // messages in queue
	CQueuePoolCapacity = (1 << 5) // generated fake messages
)
View Source
const (
	CNetworkCapacity = (1 << 10) // 1024 hashes
	CNetworkMaxConns = (1 << 6)  // 64 conns
)
View Source
const (
	CConnWaitReadDeadline = time.Hour
	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"
	CHandleNetworkKeyPath     = "/api/network/key"
	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
	CHandleNetworkKeyTemplate     = "%s" + CHandleNetworkKeyPath
	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 SFriend

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

type SPrivKey

type SPrivKey struct {
	FSessionKey string `json:"session_key,omitempty"`
	FPrivKey    string `json:"priv_key"`
}

type SRequest added in v1.5.6

type SRequest struct {
	FReceiver string `json:"receiver"` // alias_name
	FReqData  string `json:"req_data"` // data in hex encode
}

Jump to

Keyboard shortcuts

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