Versions in this module Expand all Collapse all v1 v1.9.9 May 14, 2024 v1.9.8 May 14, 2024 v1.0.0 May 14, 2024 Changes in this version + func UnwrapMessage(data tl.Serializable) (tl.Serializable, []byte) + func UnwrapQuery(data tl.Serializable) (tl.Serializable, []byte) + func WrapMessage(id []byte, data tl.Serializable) tl.Serializable + func WrapQuery(id []byte, data tl.Serializable) tl.Serializable + type ADNL interface + Answer func(ctx context.Context, queryID []byte, result tl.Serializable) error + Close func() + GetDisconnectHandler func() func(addr string, key ed25519.PublicKey) + GetID func() []byte + Query func(ctx context.Context, req, result tl.Serializable) error + RemoteAddr func() string + SendCustomMessage func(ctx context.Context, req tl.Serializable) error + SetCustomMessageHandler func(handler func(msg *adnl.MessageCustom) error) + SetDisconnectHandler func(handler func(addr string, key ed25519.PublicKey)) + SetQueryHandler func(handler func(msg *adnl.MessageQuery) error) + type ADNLOverlayWrapper struct + func (a *ADNLOverlayWrapper) Close() + func (a *ADNLOverlayWrapper) GetRandomPeers(ctx context.Context) ([]Node, error) + func (a *ADNLOverlayWrapper) Query(ctx context.Context, req, result tl.Serializable) error + func (a *ADNLOverlayWrapper) SendCustomMessage(ctx context.Context, req tl.Serializable) error + func (a *ADNLOverlayWrapper) SetAuthorizedKeys(keysWithMaxLen map[string]int32) + func (a *ADNLOverlayWrapper) SetBroadcastHandler(handler func(msg tl.Serializable, trusted bool) error) + func (a *ADNLOverlayWrapper) SetCustomMessageHandler(handler func(msg *adnl.MessageCustom) error) + func (a *ADNLOverlayWrapper) SetDisconnectHandler(handler func(addr string, key ed25519.PublicKey)) + func (a *ADNLOverlayWrapper) SetQueryHandler(handler func(msg *adnl.MessageQuery) error) + type ADNLWrapper struct + func CreateExtendedADNL(adnl ADNL) *ADNLWrapper + func (a *ADNLWrapper) CreateOverlayWithSettings(id []byte, maxUnauthBroadcastSize int32, allowBroadcastFEC bool, ...) *ADNLOverlayWrapper + func (a *ADNLWrapper) GetDisconnectHandler() func(addr string, key ed25519.PublicKey) + func (a *ADNLWrapper) SetCustomMessageHandler(handler func(msg *adnl.MessageCustom) error) + func (a *ADNLWrapper) SetDisconnectHandler(handler func(addr string, key ed25519.PublicKey)) + func (a *ADNLWrapper) SetOnUnknownOverlayQuery(handler func(query *adnl.MessageQuery) error) + func (a *ADNLWrapper) SetQueryHandler(handler func(msg *adnl.MessageQuery) error) + func (a *ADNLWrapper) UnregisterOverlay(id []byte) + func (a *ADNLWrapper) WithOverlay(id []byte) *ADNLOverlayWrapper + type Broadcast struct + Certificate any + Data []byte + Date int32 + Flags int32 + Signature []byte + Source any + type BroadcastFEC struct + Certificate any + Data []byte + DataHash []byte + DataSize int32 + Date int32 + FEC any + Flags int32 + Seqno int32 + Signature []byte + Source any + func (t *BroadcastFEC) CalcID() ([]byte, error) + type BroadcastFECID struct + DataHash []byte + Flags int32 + Size int32 + Source []byte + Type []byte + type BroadcastFECPartID struct + BroadcastHash []byte + DataHash []byte + Seqno int32 + type BroadcastFECShort struct + BroadcastHash []byte + Certificate any + PartDataHash []byte + Seqno int32 + Signature []byte + Source any + type BroadcastToSign struct + Date int32 + Hash []byte + type CertCheckResult int + const CertCheckResultForbidden + const CertCheckResultNeedCheck + const CertCheckResultTrusted + type Certificate struct + ExpireAt int32 + IssuedBy any + MaxSize int32 + Signature []byte + func (c Certificate) Check(issuedToId []byte, overlayId []byte, dataSize int32, isFEC bool) (CertCheckResult, error) + type CertificateEmpty struct + type CertificateId struct + ExpireAt int32 + MaxSize int32 + Node []byte + OverlayID []byte + type CertificateIdV2 struct + ExpireAt int32 + Flags int32 + MaxSize int32 + Node []byte + OverlayID []byte + type CertificateV2 struct + ExpireAt int32 + Flags int32 + IssuedBy any + MaxSize int32 + Signature []byte + func (c CertificateV2) Check(issuedToId []byte, overlayId []byte, dataSize int32, isFEC bool) (CertCheckResult, error) + type CheckableCert interface + Check func(issuedToId []byte, overlayId []byte, dataSize int32, isFEC bool) (CertCheckResult, error) + type FECCompleted struct + Hash []byte + type FECReceived struct + Hash []byte + type GetRandomPeers struct + List NodesList + type Message struct + Overlay []byte + type Node struct + ID any + Overlay []byte + Signature []byte + Version int32 + func NewNode(overlay []byte, key ed25519.PrivateKey) (*Node, error) + func (n *Node) CheckSignature() error + func (n *Node) Sign(key ed25519.PrivateKey) error + type NodeToSign struct + ID []byte + Overlay []byte + Version int32 + type NodesList struct + List []Node + type Query struct + Overlay []byte + type RLDP interface + Close func() + DoQuery func(ctx context.Context, maxAnswerSize int64, query, result tl.Serializable) error + GetADNL func() rldp.ADNL + SendAnswer func(ctx context.Context, maxAnswerSize int64, queryId, transferId []byte, ...) error + SetOnDisconnect func(handler func()) + SetOnQuery func(handler func(transferId []byte, query *rldp.Query) error) + type RLDPOverlayWrapper struct + func (r *RLDPOverlayWrapper) Close() + func (r *RLDPOverlayWrapper) DoQuery(ctx context.Context, maxAnswerSize int64, req, result tl.Serializable) error + func (r *RLDPOverlayWrapper) SetOnDisconnect(handler func()) + func (r *RLDPOverlayWrapper) SetOnQuery(handler func(transferId []byte, query *rldp.Query) error) + type RLDPWrapper struct + func CreateExtendedRLDP(rldp RLDP) *RLDPWrapper + func (r *RLDPWrapper) CreateOverlay(id []byte) *RLDPOverlayWrapper + func (r *RLDPWrapper) SetOnDisconnect(handler func()) + func (r *RLDPWrapper) SetOnQuery(handler func(transferId []byte, query *rldp.Query) error) + func (r *RLDPWrapper) SetOnUnknownOverlayQuery(handler func(transferId []byte, query *rldp.Query) error) + func (r *RLDPWrapper) UnregisterOverlay(id []byte)