migration6

package
v0.16.3-beta Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 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