migration6

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SessionIDSize = 33

SessionIDSize is 33-bytes; it is a serialized, compressed public key.

Variables

View Source
var (

	// ErrUninitializedDB signals that top-level buckets for the database
	// have not been initialized.
	ErrUninitializedDB = errors.New("db not initialized")

	// ErrCorruptClientSession signals that the client session's on-disk
	// structure deviates from what is expected.
	ErrCorruptClientSession = errors.New("client session corrupted")
)

Functions

func MigrateSessionIDIndex

func MigrateSessionIDIndex(tx kvdb.RwTx) error

MigrateSessionIDIndex adds a new session ID index to the tower client db. This index is a mapping from db-assigned ID (a uint64 encoded using BigSize) to real session ID (33 bytes). This mapping will allow us to persist session pointers with fewer bytes in the future.

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type SessionID

type SessionID [SessionIDSize]byte

SessionID is created from the remote public key of a client, and serves as a unique identifier and authentication for sending state updates.

func (SessionID) String

func (s SessionID) String() string

String returns a hex encoding of the session id.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL