Documentation ¶
Overview ¶
SPDX-FileCopyrightText: 2023 Jon Lundy <jon@xuu.cc> SPDX-License-Identifier: BSD-3-Clause
Index ¶
- Variables
- type DiskSessionManager
- func (sm *DiskSessionManager) ByName(name string) ulid.ULID
- func (sm *DiskSessionManager) Close() error
- func (sm *DiskSessionManager) Delete(sess *Session) error
- func (sm *DiskSessionManager) Get(id ulid.ULID) (*Session, error)
- func (sm *DiskSessionManager) Identity() *keys.EdX25519Key
- func (sm *DiskSessionManager) Load() error
- func (sm *DiskSessionManager) New(them string) (*Session, error)
- func (sm *DiskSessionManager) Position() int64
- func (sm *DiskSessionManager) Put(sess *Session) error
- func (sm *DiskSessionManager) Sessions() []Pair[string, ulid.ULID]
- func (sm *DiskSessionManager) SetPosition(pos int64)
- type Pair
- type Session
- func (s *Session) MarshalBinary() ([]byte, error)
- func (s *Session) Offer() (string, error)
- func (s *Session) ReceiveMsg(msg xochimilco.Msg) (isEstablished, isClosed bool, plaintext []byte, err error)
- func (s *Session) SetPeerKey(name string, p []byte)
- func (s *Session) UnmarshalBinary(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotExist = errors.New("does not exist") ErrInternal = errors.New("internal error") )
Functions ¶
This section is empty.
Types ¶
type DiskSessionManager ¶
type DiskSessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶
func NewSessionManager(path, me string, key *keys.EdX25519Key) (*DiskSessionManager, func() error, error)
func (*DiskSessionManager) ByName ¶
func (sm *DiskSessionManager) ByName(name string) ulid.ULID
func (*DiskSessionManager) Close ¶
func (sm *DiskSessionManager) Close() error
func (*DiskSessionManager) Delete ¶
func (sm *DiskSessionManager) Delete(sess *Session) error
func (*DiskSessionManager) Get ¶
func (sm *DiskSessionManager) Get(id ulid.ULID) (*Session, error)
func (*DiskSessionManager) Identity ¶
func (sm *DiskSessionManager) Identity() *keys.EdX25519Key
func (*DiskSessionManager) Load ¶
func (sm *DiskSessionManager) Load() error
func (*DiskSessionManager) Position ¶
func (sm *DiskSessionManager) Position() int64
func (*DiskSessionManager) Put ¶
func (sm *DiskSessionManager) Put(sess *Session) error
func (*DiskSessionManager) Sessions ¶
func (sm *DiskSessionManager) Sessions() []Pair[string, ulid.ULID]
func (*DiskSessionManager) SetPosition ¶
func (sm *DiskSessionManager) SetPosition(pos int64)
type Session ¶
type Session struct { Name string PeerKey *keys.EdX25519PublicKey Endpoint string PendingAck string *xochimilco.Session }
func NewSession ¶
func (*Session) MarshalBinary ¶
func (*Session) ReceiveMsg ¶
func (*Session) SetPeerKey ¶
func (*Session) UnmarshalBinary ¶
Click to show internal directories.
Click to hide internal directories.