keri

package
v0.0.0-...-a65a15d Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keri

type Keri struct {
	// contains filtered or unexported fields
}

func New

func New(kms *keymanager.KeyManager, db db.DB, opts ...Option) (*Keri, error)

func (*Keri) FindConnection

func (r *Keri) FindConnection(prefix string) (*klog.Log, error)

func (*Keri) Inception

func (r *Keri) Inception() (*event.Message, error)

func (*Keri) Interaction

func (r *Keri) Interaction(payload event.SealArray) (*event.Message, error)

func (*Keri) KEL

func (r *Keri) KEL() *klog.Log

func (*Keri) Prefix

func (r *Keri) Prefix() string

func (*Keri) ProcessEvent

func (r *Keri) ProcessEvent(msg *event.Message) error

func (*Keri) ProcessEvents

func (r *Keri) ProcessEvents(msgs ...*event.Message) ([]*event.Message, error)

func (*Keri) ProcessReceipt

func (r *Keri) ProcessReceipt(vrc *event.Message) error

func (*Keri) Replay

func (r *Keri) Replay(pre string, mode ReplayMode, handler ReplayHandler) error

func (*Keri) Rotate

func (r *Keri) Rotate() (*event.Message, error)

func (*Keri) Sign

func (r *Keri) Sign(data []byte) ([]byte, error)

func (*Keri) WaitForReceipt

func (r *Keri) WaitForReceipt(evt *event.Event, timeout time.Duration) (chan *event.Event, chan error)

type Option

type Option func(*Keri) error

type Receipts

type Receipts struct {
	// contains filtered or unexported fields
}

Message thread-safe message register structure.

func (*Receipts) RcptChans

func (r *Receipts) RcptChans() []chan<- *event.Event

RcptChans returns receipt channels.

func (*Receipts) RegisterRcptChan

func (r *Receipts) RegisterRcptChan(ch chan<- *event.Event) error

RegisterMsgEvent on protocol messages. The message events are triggered for incoming messages. Event will not expect any callback on these events unlike Action events.

func (*Receipts) UnregisterRcptChan

func (r *Receipts) UnregisterRcptChan(ch chan<- *event.Event) error

UnregisterMsgEvent on protocol messages. Refer RegisterMsgEvent().

type ReplayHandler

type ReplayHandler func(e *event.Message) error

type ReplayMode

type ReplayMode int
const (
	FirstSeenReplay ReplayMode = iota
	SequenceNumberReplay
)

Jump to

Keyboard shortcuts

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