common

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewManagerBuilder

func NewManagerBuilder(prm ManagersPrm, opts ...MngOption) common.ManagerBuilder

NewManagerBuilder creates a new instance of the managerBuilder.

Panics if at least one value of the parameters is invalid.

The created managerBuilder does not require additional initialization and is completely ready for work.

func PanicOnPrmValue

func PanicOnPrmValue(n string, v interface{})

Types

type EpochContext

type EpochContext struct {
	context.Context
	E uint64
}

EpochContext is a std context extended with epoch data.

func (*EpochContext) Epoch

func (ctx *EpochContext) Epoch() uint64

type ManagersPrm

type ManagersPrm struct {
	NetMapSource netmapcore.Source
}

ManagersPrm groups the required parameters of the managerBuilder's constructor.

All values must comply with the requirements imposed on them. Passing incorrect parameter values will result in constructor failure (error or panic depending on the implementation).

type MngOption

type MngOption func(*mngOptions)

func WithLogger

func WithLogger(l *logger.Logger) MngOption

WithLogger returns MngOption to specify logging component.

type NopReputationWriter

type NopReputationWriter struct{}

func (NopReputationWriter) Close

func (NopReputationWriter) Close() error

func (NopReputationWriter) Write

type OnlyKeyRemoteServerInfo

type OnlyKeyRemoteServerInfo struct {
	Key []byte
}

OnlyKeyRemoteServerInfo if implementation of reputation.ServerInfo interface but with only public key data.

func (*OnlyKeyRemoteServerInfo) Address

func (*OnlyKeyRemoteServerInfo) Address() string

func (*OnlyKeyRemoteServerInfo) PublicKey

func (i *OnlyKeyRemoteServerInfo) PublicKey() []byte

type RemoteProviderPrm

type RemoteProviderPrm struct {
	LocalAddrSrc    network.LocalAddressSource
	DeadEndProvider reputationcommon.WriterProvider
	ClientCache     clientCache
	WriterProvider  clientKeyRemoteProvider
}

RemoteProviderPrm groups the required parameters of the remoteTrustProvider's constructor.

All values must comply with the requirements imposed on them. Passing incorrect parameter values will result in constructor failure (error or panic depending on the implementation).

Jump to

Keyboard shortcuts

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