anonymity

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 18 Imported by: 2

Documentation

Overview

Package anonymity allows you to perform network operations on top of anonymizing traffic.

The package basically uses the fifth^ stage of anonymity with a queue-based problem. All applied connections use friend-to-friend (F2F) communications.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSetHashIntoDB         = &SAnonymityError{"set hash into database"}
	ErrGetHashFromDB         = &SAnonymityError{"get hash from database"}
	ErrNilDB                 = &SAnonymityError{"database is nil"}
	ErrRetryLimit            = &SAnonymityError{"retry limit"}
	ErrEnqueueMessage        = &SAnonymityError{"enqueue message"}
	ErrUnknownType           = &SAnonymityError{"unknown type"}
	ErrLoadMessage           = &SAnonymityError{"load message"}
	ErrStoreHashIntoDatabase = &SAnonymityError{"store hash into database"}
	ErrStoreHashWithProduce  = &SAnonymityError{"store hash with produce"}
	ErrActionIsNotFound      = &SAnonymityError{"action is not found"}
	ErrActionIsClosed        = &SAnonymityError{"action is closed"}
	ErrActionTimeout         = &SAnonymityError{"action timeout"}
	ErrEnqueuePayload        = &SAnonymityError{"enqueue payload"}
	ErrFetchResponse         = &SAnonymityError{"fetch response"}
	ErrRunning               = &SAnonymityError{"node running"}
	ErrProcessRun            = &SAnonymityError{"process run"}
	ErrHashAlreadyExist      = &SAnonymityError{"hash already exist"}
)

Functions

This section is empty.

Types

type IHandlerF

type IHandlerF func(context.Context, INode, asymmetric.IPubKey, []byte) ([]byte, error)

type INode

type INode interface {
	types.IRunner
	HandleFunc(uint32, IHandlerF) INode

	GetLogger() logger.ILogger
	GetSettings() ISettings
	GetAdapter() adapters.IAdapter
	GetKVDatabase() database.IKVDatabase
	GetMapPubKeys() asymmetric.IMapPubKeys
	GetQBProcessor() queue.IQBProblemProcessor

	SendPayload(context.Context, asymmetric.IPubKey, payload.IPayload64) error
	FetchPayload(context.Context, asymmetric.IPubKey, payload.IPayload32) ([]byte, error)
}

func NewNode

func NewNode(
	pSett ISettings,
	pLogger logger.ILogger,
	pAdapter adapters.IAdapter,
	pKVDatavase database.IKVDatabase,
	pQBProcessor queue.IQBProblemProcessor,
) INode

type ISettings

type ISettings interface {
	GetServiceName() string
	GetFetchTimeout() time.Duration
}

func NewSettings

func NewSettings(pSett *SSettings) ISettings

type SAnonymityError

type SAnonymityError struct {
	// contains filtered or unexported fields
}

func (*SAnonymityError) Error

func (err *SAnonymityError) Error() string

type SSettings

type SSettings sSettings

Directories

Path Synopsis
examples
Package logger gives access to the parameters of anonymizing traffic for subsequent logging.
Package logger gives access to the parameters of anonymizing traffic for subsequent logging.
Package queue allows you to queue and retrieve network encrypted messages from the queue.
Package queue allows you to queue and retrieve network encrypted messages from the queue.

Jump to

Keyboard shortcuts

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