transactions

package
v2.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: MPL-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultIdIssuer varintIdIssuer

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher[S any] struct {
	// contains filtered or unexported fields
}

func (*Dispatcher[S]) Add

func (me *Dispatcher[S]) Add(key Key, state S)

func (*Dispatcher[S]) Delete

func (me *Dispatcher[S]) Delete(key Key) bool

func (*Dispatcher[S]) Have

func (me *Dispatcher[S]) Have(key Key) bool

func (*Dispatcher[S]) NumActive

func (me *Dispatcher[S]) NumActive() int

func (*Dispatcher[S]) Pop

func (me *Dispatcher[S]) Pop(key Key) S

type Id

type Id = string

Transaction key type, probably should match whatever is used in KRPC messages for the `t` field.

type IdIssuer

type IdIssuer interface {
	Issue() Id
}

type Key

type Key struct {
	// The KRPC transaction ID.
	T Id
	// host:port
	RemoteAddr string
}

Matches both ID and addr to transactions.

Jump to

Keyboard shortcuts

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