Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PanicOnPrmValue ¶
Types ¶
type EpochProvider ¶
type EpochProvider struct {
E uint64
}
func (*EpochProvider) Epoch ¶
func (ep *EpochProvider) Epoch() uint64
type NopReputationWriter ¶
type NopReputationWriter struct{}
func (NopReputationWriter) Write ¶
func (NopReputationWriter) Write(context.Context, reputation.Trust) error
type OnlyKeyRemoteServerInfo ¶
type OnlyKeyRemoteServerInfo struct {
Key []byte
}
OnlyKeyRemoteServerInfo is an implementation of reputation.ServerInfo interface but with only public key data.
func (*OnlyKeyRemoteServerInfo) ExternalAddresses ¶
func (*OnlyKeyRemoteServerInfo) ExternalAddresses() []string
func (*OnlyKeyRemoteServerInfo) IterateAddresses ¶
func (*OnlyKeyRemoteServerInfo) IterateAddresses(func(string) bool)
func (*OnlyKeyRemoteServerInfo) NumberOfAddresses ¶
func (*OnlyKeyRemoteServerInfo) NumberOfAddresses() int
func (*OnlyKeyRemoteServerInfo) PublicKey ¶
func (i *OnlyKeyRemoteServerInfo) PublicKey() []byte
type RemoteProviderPrm ¶
type RemoteProviderPrm struct { NetmapKeys netmap.AnnouncedKeys DeadEndProvider reputationcommon.WriterProvider ClientCache clientCache WriterProvider clientKeyRemoteProvider Log *logger.Logger }
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).
type RemoteTrustProvider ¶
type RemoteTrustProvider struct {
// contains filtered or unexported fields
}
RemoteTrustProvider is an implementation of reputation RemoteWriterProvider interface. It caches clients, checks if it is the end of the route and checks either the current node is a remote target or not.
remoteTrustProvider requires to be provided with clientKeyRemoteProvider.
func NewRemoteTrustProvider ¶
func NewRemoteTrustProvider(prm RemoteProviderPrm) *RemoteTrustProvider
func (*RemoteTrustProvider) InitRemote ¶
func (rtp *RemoteTrustProvider) InitRemote(srv reputationcommon.ServerInfo) (reputationcommon.WriterProvider, error)