Documentation ¶
Index ¶
- Constants
- type BaseImpl
- func (s *BaseImpl) AddHolder(holder Holder)
- func (s *BaseImpl) DispatchSessionEvent(event DelegateEvent)
- func (s *BaseImpl) FabricIndex() lib.FabricIndex
- func (s *BaseImpl) IsGroup() bool
- func (s *BaseImpl) IsSecure() bool
- func (s *BaseImpl) LogValue() log.Value
- func (s *BaseImpl) NotifySessionReleased()
- func (s *BaseImpl) RemoveHolder(holder Holder)
- func (s *BaseImpl) Type() Type
- type Delegate
- type DelegateEvent
- type ErrorType
- type GlobalUnencryptedMessageCounter
- type Holder
- type IncomingGroupSession
- func (i *IncomingGroupSession) AckTimeout() time.Duration
- func (i *IncomingGroupSession) ClearValue()
- func (i *IncomingGroupSession) ComputeRoundTripTimeout(upperlayerProcessingTimeout time.Duration) time.Duration
- func (i *IncomingGroupSession) GetPeer() lib.ScopedNodeId
- func (i *IncomingGroupSession) IsActive() bool
- func (i *IncomingGroupSession) IsEstablishing() bool
- func (i *IncomingGroupSession) Released()
- func (i *IncomingGroupSession) RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig
- func (i *IncomingGroupSession) RequireMRP() bool
- type LocalMessageCounter
- type MessageCounter
- type MessageCounterBase
- type MessageCounterType
- type OptionalFunc
- func WithFabricIndex(index lib.FabricIndex) OptionalFunc
- func WithLocalNodeId(localNodeId lib.NodeId) OptionalFunc
- func WithMRPC(config *messageing.ReliableMessageProtocolConfig) OptionalFunc
- func WithPeerCATs(peerCATs *lib.CATValues) OptionalFunc
- func WithPeerNodeId(peerNodeId lib.NodeId) OptionalFunc
- func WithPeerSessionId(peerSessionId uint16) OptionalFunc
- type OutgoingGroup
- func (o *OutgoingGroup) AckTimeout() time.Duration
- func (o *OutgoingGroup) ClearValue()
- func (o *OutgoingGroup) ComputeRoundTripTimeout(upperlayerProcessingTimeout time.Duration) time.Duration
- func (o *OutgoingGroup) GetPeer() lib.ScopedNodeId
- func (o *OutgoingGroup) GroupId() lib.GroupId
- func (o *OutgoingGroup) IsActive() bool
- func (o *OutgoingGroup) IsEstablishing() bool
- func (o *OutgoingGroup) Released()
- func (o *OutgoingGroup) RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig
- func (o *OutgoingGroup) RequireMRP() bool
- type PeerMessageCounter
- func (c *PeerMessageCounter) CommitGroup(counter uint32)
- func (c *PeerMessageCounter) CommitUnencrypted(counter uint32)
- func (c *PeerMessageCounter) CommitUnencryptedUnicast(counter uint32)
- func (c *PeerMessageCounter) SetCounter(counter uint32)
- func (c *PeerMessageCounter) VerifyEncryptedUnicast(counter uint32) error
- func (c *PeerMessageCounter) VerifyGroup(counter uint32) error
- func (c *PeerMessageCounter) VerifyOrTrustFirstGroup(counter uint32) error
- func (c *PeerMessageCounter) VerifyPositionEncrypted(pos position, counter uint32) error
- func (c *PeerMessageCounter) VerifyPositionUnencrypted(pos position, counter uint32) error
- func (c *PeerMessageCounter) VerifyUnencrypted(counter uint32) error
- type Role
- type Secure
- func (s *Secure) AckTimeout() time.Duration
- func (s *Secure) Activate(local, peer lib.ScopedNodeId, ts lib.CATValues, peerSessionId uint16, ...)
- func (s *Secure) ClearValue()
- func (s *Secure) ComputeRoundTripTimeout(upperlayerProcessingTimeout time.Duration) time.Duration
- func (s *Secure) GetCryptoContext() *transport.CryptoContext
- func (s *Secure) GetPeer() lib.ScopedNodeId
- func (s *Secure) IsActive() bool
- func (s *Secure) IsCASESession() bool
- func (s *Secure) IsDefunct() bool
- func (s *Secure) IsEstablishing() bool
- func (s *Secure) IsPendingEviction() bool
- func (s *Secure) LocalSessionId() uint16
- func (s *Secure) MarkActive()
- func (s *Secure) MarkActiveRx()
- func (s *Secure) MarkAsDefunct()
- func (s *Secure) MarkForEviction()
- func (s *Secure) MoveToState(targetState State)
- func (s *Secure) Name() string
- func (s *Secure) PeerAddress() raw.PeerAddress
- func (s *Secure) PeerNodeId() lib.NodeId
- func (s *Secure) Released()
- func (s *Secure) RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig
- func (s *Secure) RequireMRP() bool
- func (s *Secure) SecureType() SecureType
- func (s *Secure) SessionMessageCounter() MessageCounter
- func (s *Secure) SetPeerAddress(address raw.PeerAddress)
- func (s *Secure) State() State
- type SecureDelegate
- type SecureType
- type Session
- type State
- type SyncInProcess
- type Synced
- type Type
- type Unauthenticated
- func (s *Unauthenticated) AckTimeout() time.Duration
- func (s *Unauthenticated) ClearValue()
- func (s *Unauthenticated) ComputeRoundTripTimeout(upperlayerProcessingTimeout time.Duration) time.Duration
- func (s *Unauthenticated) DispatchSessionEvent(delegate DelegateEvent)
- func (s *Unauthenticated) EphemeralInitiatorNodeId() lib.NodeId
- func (s *Unauthenticated) GetPeer() lib.ScopedNodeId
- func (s *Unauthenticated) IsActive() bool
- func (s *Unauthenticated) IsEstablishing() bool
- func (s *Unauthenticated) LastActivityTime() time.Time
- func (s *Unauthenticated) LastPeerActivityTime() time.Time
- func (s *Unauthenticated) MarkActive()
- func (s *Unauthenticated) MarkActiveRx()
- func (s *Unauthenticated) PeerAddress() raw.PeerAddress
- func (s *Unauthenticated) PeerMessageCounter() *PeerMessageCounter
- func (s *Unauthenticated) PeerNodeId() lib.NodeId
- func (s *Unauthenticated) Released()
- func (s *Unauthenticated) RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig
- func (s *Unauthenticated) RequireMRP() bool
- func (s *Unauthenticated) Role() Role
- func (s *Unauthenticated) SessionReleased()
- func (s *Unauthenticated) SetPeerAddress(addr netip.AddrPort)
- func (s *Unauthenticated) SetRemoteMRPConfig(config *messageing.ReliableMessageProtocolConfig)
Constants ¶
View Source
const ( GlobalUnencrypted = iota GlobalEncrypted CounterTypeSession )
View Source
const InitialSyncValue uint32 = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseImpl ¶
type BaseImpl struct { *lib.ReferenceCounted // contains filtered or unexported fields }
func (*BaseImpl) DispatchSessionEvent ¶
func (s *BaseImpl) DispatchSessionEvent(event DelegateEvent)
func (*BaseImpl) FabricIndex ¶
func (s *BaseImpl) FabricIndex() lib.FabricIndex
func (*BaseImpl) NotifySessionReleased ¶
func (s *BaseImpl) NotifySessionReleased()
func (*BaseImpl) RemoveHolder ¶
type DelegateEvent ¶
type DelegateEvent func()
type ErrorType ¶
type ErrorType string
var ErrorMessageCounterExhausted ErrorType = "MessageCounterExhausted"
type GlobalUnencryptedMessageCounter ¶
type GlobalUnencryptedMessageCounter struct {
LastUsedValue uint32
}
func NewGlobalUnencryptedMessageCounter ¶
func NewGlobalUnencryptedMessageCounter() *GlobalUnencryptedMessageCounter
func (GlobalUnencryptedMessageCounter) AdvanceAndConsume ¶
func (g GlobalUnencryptedMessageCounter) AdvanceAndConsume() (uint32, error)
func (GlobalUnencryptedMessageCounter) Type ¶
func (g GlobalUnencryptedMessageCounter) Type() MessageCounterType
type Holder ¶
type Holder interface {
DispatchSessionEvent(DelegateEvent)
}
type IncomingGroupSession ¶
type IncomingGroupSession struct { *BaseImpl // contains filtered or unexported fields }
func NewIncomingGroupSession ¶
func NewIncomingGroupSession(groupId lib.GroupId, index lib.FabricIndex, nodeId lib.NodeId) *IncomingGroupSession
func (*IncomingGroupSession) AckTimeout ¶
func (i *IncomingGroupSession) AckTimeout() time.Duration
func (*IncomingGroupSession) ClearValue ¶
func (i *IncomingGroupSession) ClearValue()
func (*IncomingGroupSession) ComputeRoundTripTimeout ¶
func (i *IncomingGroupSession) ComputeRoundTripTimeout(upperlayerProcessingTimeout time.Duration) time.Duration
func (*IncomingGroupSession) GetPeer ¶
func (i *IncomingGroupSession) GetPeer() lib.ScopedNodeId
func (*IncomingGroupSession) IsActive ¶
func (i *IncomingGroupSession) IsActive() bool
func (*IncomingGroupSession) IsEstablishing ¶
func (i *IncomingGroupSession) IsEstablishing() bool
func (*IncomingGroupSession) Released ¶
func (i *IncomingGroupSession) Released()
func (*IncomingGroupSession) RemoteMRPConfig ¶
func (i *IncomingGroupSession) RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig
func (*IncomingGroupSession) RequireMRP ¶
func (i *IncomingGroupSession) RequireMRP() bool
type LocalMessageCounter ¶
type LocalMessageCounter struct {
LastUsedValue uint32
}
func NewLocalMessageCounter ¶
func NewLocalMessageCounter() *LocalMessageCounter
func (LocalMessageCounter) AdvanceAndConsume ¶
func (l LocalMessageCounter) AdvanceAndConsume() (uint32, error)
func (LocalMessageCounter) Type ¶
func (l LocalMessageCounter) Type() MessageCounterType
type MessageCounter ¶
type MessageCounter struct { MessageCounter *LocalMessageCounter PeerMessageCounter *PeerMessageCounter }
type MessageCounterBase ¶
type MessageCounterBase interface { AdvanceAndConsume() (uint32, error) Type() MessageCounterType }
type MessageCounterType ¶
type MessageCounterType uint8
type OptionalFunc ¶
type OptionalFunc func(*Secure)
func WithFabricIndex ¶
func WithFabricIndex(index lib.FabricIndex) OptionalFunc
func WithLocalNodeId ¶
func WithLocalNodeId(localNodeId lib.NodeId) OptionalFunc
func WithMRPC ¶
func WithMRPC(config *messageing.ReliableMessageProtocolConfig) OptionalFunc
func WithPeerCATs ¶
func WithPeerCATs(peerCATs *lib.CATValues) OptionalFunc
func WithPeerNodeId ¶
func WithPeerNodeId(peerNodeId lib.NodeId) OptionalFunc
func WithPeerSessionId ¶
func WithPeerSessionId(peerSessionId uint16) OptionalFunc
type OutgoingGroup ¶
type OutgoingGroup struct { *BaseImpl // contains filtered or unexported fields }
func NewOutgoingGroupSession ¶
func NewOutgoingGroupSession(groupId lib.GroupId, index lib.FabricIndex) *OutgoingGroup
func (*OutgoingGroup) AckTimeout ¶
func (o *OutgoingGroup) AckTimeout() time.Duration
func (*OutgoingGroup) ClearValue ¶
func (o *OutgoingGroup) ClearValue()
func (*OutgoingGroup) ComputeRoundTripTimeout ¶
func (o *OutgoingGroup) ComputeRoundTripTimeout(upperlayerProcessingTimeout time.Duration) time.Duration
func (*OutgoingGroup) GetPeer ¶
func (o *OutgoingGroup) GetPeer() lib.ScopedNodeId
func (*OutgoingGroup) GroupId ¶
func (o *OutgoingGroup) GroupId() lib.GroupId
func (*OutgoingGroup) IsActive ¶
func (o *OutgoingGroup) IsActive() bool
func (*OutgoingGroup) IsEstablishing ¶
func (o *OutgoingGroup) IsEstablishing() bool
func (*OutgoingGroup) Released ¶
func (o *OutgoingGroup) Released()
func (*OutgoingGroup) RemoteMRPConfig ¶
func (o *OutgoingGroup) RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig
func (*OutgoingGroup) RequireMRP ¶
func (o *OutgoingGroup) RequireMRP() bool
type PeerMessageCounter ¶
type PeerMessageCounter struct {
// contains filtered or unexported fields
}
func NewPeerMessageCounter ¶
func NewPeerMessageCounter() *PeerMessageCounter
func (*PeerMessageCounter) CommitGroup ¶
func (c *PeerMessageCounter) CommitGroup(counter uint32)
func (*PeerMessageCounter) CommitUnencrypted ¶
func (c *PeerMessageCounter) CommitUnencrypted(counter uint32)
func (*PeerMessageCounter) CommitUnencryptedUnicast ¶
func (c *PeerMessageCounter) CommitUnencryptedUnicast(counter uint32)
func (*PeerMessageCounter) SetCounter ¶
func (c *PeerMessageCounter) SetCounter(counter uint32)
func (*PeerMessageCounter) VerifyEncryptedUnicast ¶
func (c *PeerMessageCounter) VerifyEncryptedUnicast(counter uint32) error
func (*PeerMessageCounter) VerifyGroup ¶
func (c *PeerMessageCounter) VerifyGroup(counter uint32) error
func (*PeerMessageCounter) VerifyOrTrustFirstGroup ¶
func (c *PeerMessageCounter) VerifyOrTrustFirstGroup(counter uint32) error
func (*PeerMessageCounter) VerifyPositionEncrypted ¶
func (c *PeerMessageCounter) VerifyPositionEncrypted(pos position, counter uint32) error
func (*PeerMessageCounter) VerifyPositionUnencrypted ¶
func (c *PeerMessageCounter) VerifyPositionUnencrypted(pos position, counter uint32) error
func (*PeerMessageCounter) VerifyUnencrypted ¶
func (c *PeerMessageCounter) VerifyUnencrypted(counter uint32) error
type Secure ¶
type Secure struct { *BaseImpl // contains filtered or unexported fields }
func NewSecure ¶
func NewSecure( table SecureDelegate, secureSessionType SecureType, localSessionId uint16, options ...OptionalFunc, ) *Secure
func (*Secure) AckTimeout ¶
func (*Secure) Activate ¶
func (s *Secure) Activate(local, peer lib.ScopedNodeId, ts lib.CATValues, peerSessionId uint16, config *messageing.ReliableMessageProtocolConfig)
func (*Secure) ClearValue ¶
func (s *Secure) ClearValue()
func (*Secure) ComputeRoundTripTimeout ¶
func (*Secure) GetCryptoContext ¶
func (s *Secure) GetCryptoContext() *transport.CryptoContext
func (*Secure) GetPeer ¶
func (s *Secure) GetPeer() lib.ScopedNodeId
func (*Secure) IsCASESession ¶
func (*Secure) IsEstablishing ¶
func (*Secure) IsPendingEviction ¶
func (*Secure) LocalSessionId ¶
func (*Secure) MarkActive ¶
func (s *Secure) MarkActive()
func (*Secure) MarkActiveRx ¶
func (s *Secure) MarkActiveRx()
func (*Secure) MarkForEviction ¶
func (s *Secure) MarkForEviction()
func (*Secure) MoveToState ¶
func (*Secure) PeerAddress ¶
func (s *Secure) PeerAddress() raw.PeerAddress
func (*Secure) PeerNodeId ¶
func (*Secure) RemoteMRPConfig ¶
func (s *Secure) RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig
func (*Secure) RequireMRP ¶
func (*Secure) SecureType ¶
func (s *Secure) SecureType() SecureType
func (*Secure) SessionMessageCounter ¶
func (s *Secure) SessionMessageCounter() MessageCounter
func (*Secure) SetPeerAddress ¶
func (s *Secure) SetPeerAddress(address raw.PeerAddress)
type SecureDelegate ¶
type SecureDelegate interface {
ReleaseSession(secure *Secure)
}
type SecureType ¶
type SecureType uint8
const ( SecureTypePASE SecureType = iota SecureTypeCASE )
func (SecureType) String ¶
func (t SecureType) String() string
type Session ¶
type Session interface { Retain() Release() IsActive() bool IsEstablishing() bool AckTimeout() time.Duration GetPeer() lib.ScopedNodeId ComputeRoundTripTimeout(duration time.Duration) time.Duration RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig RequireMRP() bool Released() ClearValue() AddHolder(handle Holder) RemoveHolder(holder Holder) FabricIndex() lib.FabricIndex NotifySessionReleased() DispatchSessionEvent(delegate DelegateEvent) IsSecure() bool IsGroup() bool Type() Type }
type SyncInProcess ¶
type SyncInProcess struct {
// contains filtered or unexported fields
}
type Unauthenticated ¶
type Unauthenticated struct { *BaseImpl // contains filtered or unexported fields }
func NewUnauthenticated ¶
func NewUnauthenticated(roleResponder Role, ephemeralInitiatorNodeID lib.NodeId, config *messageing.ReliableMessageProtocolConfig) *Unauthenticated
func (*Unauthenticated) AckTimeout ¶
func (s *Unauthenticated) AckTimeout() time.Duration
func (*Unauthenticated) ClearValue ¶
func (s *Unauthenticated) ClearValue()
func (*Unauthenticated) ComputeRoundTripTimeout ¶
func (s *Unauthenticated) ComputeRoundTripTimeout(upperlayerProcessingTimeout time.Duration) time.Duration
func (*Unauthenticated) DispatchSessionEvent ¶
func (s *Unauthenticated) DispatchSessionEvent(delegate DelegateEvent)
func (*Unauthenticated) EphemeralInitiatorNodeId ¶
func (s *Unauthenticated) EphemeralInitiatorNodeId() lib.NodeId
func (*Unauthenticated) GetPeer ¶
func (s *Unauthenticated) GetPeer() lib.ScopedNodeId
func (*Unauthenticated) IsActive ¶
func (s *Unauthenticated) IsActive() bool
func (*Unauthenticated) IsEstablishing ¶
func (s *Unauthenticated) IsEstablishing() bool
func (*Unauthenticated) LastActivityTime ¶
func (s *Unauthenticated) LastActivityTime() time.Time
func (*Unauthenticated) LastPeerActivityTime ¶
func (s *Unauthenticated) LastPeerActivityTime() time.Time
func (*Unauthenticated) MarkActive ¶
func (s *Unauthenticated) MarkActive()
func (*Unauthenticated) MarkActiveRx ¶
func (s *Unauthenticated) MarkActiveRx()
func (*Unauthenticated) PeerAddress ¶
func (s *Unauthenticated) PeerAddress() raw.PeerAddress
func (*Unauthenticated) PeerMessageCounter ¶
func (s *Unauthenticated) PeerMessageCounter() *PeerMessageCounter
func (*Unauthenticated) PeerNodeId ¶
func (s *Unauthenticated) PeerNodeId() lib.NodeId
func (*Unauthenticated) Released ¶
func (s *Unauthenticated) Released()
func (*Unauthenticated) RemoteMRPConfig ¶
func (s *Unauthenticated) RemoteMRPConfig() *messageing.ReliableMessageProtocolConfig
func (*Unauthenticated) RequireMRP ¶
func (s *Unauthenticated) RequireMRP() bool
func (*Unauthenticated) Role ¶
func (s *Unauthenticated) Role() Role
func (*Unauthenticated) SessionReleased ¶
func (s *Unauthenticated) SessionReleased()
func (*Unauthenticated) SetPeerAddress ¶
func (s *Unauthenticated) SetPeerAddress(addr netip.AddrPort)
func (*Unauthenticated) SetRemoteMRPConfig ¶
func (s *Unauthenticated) SetRemoteMRPConfig(config *messageing.ReliableMessageProtocolConfig)
Click to show internal directories.
Click to hide internal directories.