Documentation
¶
Index ¶
- Constants
- type ANDERROR
- type ANDFullPeerSessionIdentity
- type ANDPeerSession
- type ANDPeerSessionIdentity
- type ANDPeerSessionWithTimeStamp
- type AbystInboundSession
- type EMemberObjectAppend
- type EMemberObjectDelete
- type EWorldMemberLeave
- type EWorldMemberReady
- type EWorldMemberRequest
- type EWorldTerminate
- type IANDPeer
- type IAbyssHost
- type IAbyssWorld
- type IAddressSelector
- type IHostIdentity
- type INeighborDiscovery
- type INetworkService
- type IPathResolver
- type IPreAccepter
- type IWorldMember
- type NeighborEvent
- type NeighborEventType
- type ObjectInfo
- type PeerCertificates
Constants ¶
View Source
const NextProtoAbyss = "abyss"
TLS ALPN code
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ANDERROR ¶
type ANDERROR int
const ( EINVAL ANDERROR //invalid argument EPANIC //unrecoverable internal error (must not occur) )
type ANDFullPeerSessionIdentity ¶ added in v0.0.24
type ANDPeerSession ¶
type ANDPeerSessionIdentity ¶ added in v0.0.24
type ANDPeerSessionWithTimeStamp ¶ added in v0.0.24
type ANDPeerSessionWithTimeStamp struct { ANDPeerSession TimeStamp time.Time }
type AbystInboundSession ¶
type AbystInboundSession struct { PeerHash string Connection quic.Connection }
type EMemberObjectAppend ¶ added in v0.0.19
type EMemberObjectAppend struct { PeerHash string Objects []ObjectInfo }
type EMemberObjectDelete ¶ added in v0.0.19
type EWorldMemberLeave ¶ added in v0.0.19
type EWorldMemberLeave struct {
PeerHash string
}
type EWorldMemberReady ¶ added in v0.0.19
type EWorldMemberReady struct {
Member IWorldMember
}
type EWorldMemberRequest ¶ added in v0.0.19
type EWorldTerminate ¶
type EWorldTerminate struct{}
type IANDPeer ¶
type IANDPeer interface { IDHash() string RootCertificateDer() []byte HandshakeKeyCertificateDer() []byte IsConnected() bool AURL() *aurl.AURL //inactivity check Context() context.Context Activate() Renew() Deactivate() Error() error AhmpCh() chan any TrySendJN(local_session_id uuid.UUID, path string, timestamp time.Time) bool TrySendJOK(local_session_id uuid.UUID, peer_session_id uuid.UUID, timestamp time.Time, world_url string, member_sessions []ANDPeerSessionWithTimeStamp) bool TrySendJDN(peer_session_id uuid.UUID, code int, message string) bool TrySendJNI(local_session_id uuid.UUID, peer_session_id uuid.UUID, member_session ANDPeerSessionWithTimeStamp) bool TrySendMEM(local_session_id uuid.UUID, peer_session_id uuid.UUID, timestamp time.Time) bool TrySendSJN(local_session_id uuid.UUID, peer_session_id uuid.UUID, member_sessions []ANDPeerSessionIdentity) bool TrySendCRR(local_session_id uuid.UUID, peer_session_id uuid.UUID, member_sessions []ANDPeerSessionIdentity) bool TrySendRST(local_session_id uuid.UUID, peer_session_id uuid.UUID) bool TrySendSOA(local_session_id uuid.UUID, peer_session_id uuid.UUID, objects []ObjectInfo) bool TrySendSOD(local_session_id uuid.UUID, peer_session_id uuid.UUID, objectIDs []uuid.UUID) bool }
type IAbyssHost ¶
type IAbyssHost interface { GetLocalAbyssURL() *aurl.AURL OpenOutboundConnection(abyss_url *aurl.AURL) //Abyss OpenWorld(web_url string) (IAbyssWorld, error) JoinWorld(ctx context.Context, abyss_url *aurl.AURL) (IAbyssWorld, error) LeaveWorld(world IAbyssWorld) //this does not wait for world-related resource cleanup. //Abyst GetAbystClientConnection(peer_hash string) (*http3.ClientConn, error) }
type IAbyssWorld ¶
type IAddressSelector ¶
type IHostIdentity ¶
type INeighborDiscovery ¶
type INeighborDiscovery interface { EventChannel() chan NeighborEvent //calls PeerConnected(peer IANDPeer) ANDERROR PeerClose(peer IANDPeer) ANDERROR OpenWorld(local_session_id uuid.UUID, world_url string) ANDERROR JoinWorld(local_session_id uuid.UUID, abyss_url *aurl.AURL) ANDERROR AcceptSession(local_session_id uuid.UUID, peer_session ANDPeerSession) ANDERROR DeclineSession(local_session_id uuid.UUID, peer_session ANDPeerSession, code int, message string) ANDERROR CloseWorld(local_session_id uuid.UUID) ANDERROR TimerExpire(local_session_id uuid.UUID) ANDERROR //ahmp messages JN(local_session_id uuid.UUID, peer_session ANDPeerSession, timestamp time.Time) ANDERROR JOK(local_session_id uuid.UUID, peer_session ANDPeerSession, timestamp time.Time, world_url string, member_sessions []ANDFullPeerSessionIdentity) ANDERROR JDN(local_session_id uuid.UUID, peer IANDPeer, code int, message string) ANDERROR JNI(local_session_id uuid.UUID, peer_session ANDPeerSession, member_session ANDFullPeerSessionIdentity) ANDERROR MEM(local_session_id uuid.UUID, peer_session ANDPeerSession, timestamp time.Time) ANDERROR SJN(local_session_id uuid.UUID, peer_session ANDPeerSession, member_infos []ANDPeerSessionIdentity) ANDERROR CRR(local_session_id uuid.UUID, peer_session ANDPeerSession, member_infos []ANDPeerSessionIdentity) ANDERROR RST(local_session_id uuid.UUID, peer_session ANDPeerSession) ANDERROR SOA(local_session_id uuid.UUID, peer_session ANDPeerSession, objects []ObjectInfo) ANDERROR SOD(local_session_id uuid.UUID, peer_session ANDPeerSession, objectIDs []uuid.UUID) ANDERROR }
type INetworkService ¶
type INetworkService interface { LocalIdentity() IHostIdentity LocalAURL() *aurl.AURL HandlePreAccept(preaccept_handler IPreAccepter) // if false, return status code and message ListenAndServe() error AppendKnownPeer(root_cert string, handshake_key_cert string) error AppendKnownPeerDer(root_cert []byte, handshake_key_cert []byte) error GetAbyssPeerChannel() chan IANDPeer //wait for established abyss mutual connection ConnectAbyssAsync(url *aurl.AURL) error //may return error if peer information has expired. ConnectAbyst(peer_hash string) (quic.Connection, error) //should take ~2 rtt. }
1. AbyssAsync 'always' succeeds, resulting in IANDPeer -> if connection failed, IANDPeer methods return error. 2. Abyst may fail at any moment
type IPathResolver ¶
type IPreAccepter ¶
type IWorldMember ¶ added in v0.0.19
type NeighborEvent ¶
type NeighborEvent struct { Type NeighborEventType LocalSessionID uuid.UUID ANDPeerSession Text string Value int Object any }
type NeighborEventType ¶
type NeighborEventType int
const ( ANDSessionRequest NeighborEventType = iota + 2 ANDSessionReady ANDSessionClose ANDJoinSuccess ANDJoinFail ANDWorldLeave //called after WorldLeave ANDConnectRequest ANDTimerRequest ANDPeerRegister ANDObjectAppend ANDObjectDelete ANDNeighborEventDebug )
type PeerCertificates ¶
Click to show internal directories.
Click to hide internal directories.