drkey

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientEngine

type ClientEngine struct {
	IA      addr.IA
	DB      drkey.Level2DB
	Fetcher Fetcher
}

ClientEngine is the DRKey store used in the client side.

func (*ClientEngine) CreateStorageCleaners

func (e *ClientEngine) CreateStorageCleaners() []*cleaner.Cleaner

CreateStorageCleaners creates three Cleaner tasks that removes AS-Host, Host-AS and Host-Host keys respectively.

func (*ClientEngine) GetASHostKey

func (e *ClientEngine) GetASHostKey(
	ctx context.Context,
	meta drkey.ASHostMeta,
) (drkey.ASHostKey, error)

GetASHostKey returns the ASHost key from the local DB or if not found, by asking our local CS.

func (*ClientEngine) GetHostASKey

func (e *ClientEngine) GetHostASKey(
	ctx context.Context,
	meta drkey.HostASMeta,
) (drkey.HostASKey, error)

GetHostASKey returns the HostAS key from the local DB or if not found, by asking our local CS.

func (*ClientEngine) GetHostHostKey

func (e *ClientEngine) GetHostHostKey(
	ctx context.Context,
	meta drkey.HostHostMeta,
) (drkey.HostHostKey, error)

GetHostHostKey returns the HostHost key from the local DB or if not found, by asking our local CS.

type Fetcher

type Fetcher interface {
	ASHostKey(ctx context.Context, meta drkey.ASHostMeta) (drkey.ASHostKey, error)
	HostASKey(ctx context.Context, meta drkey.HostASMeta) (drkey.HostASKey, error)
	HostHostKey(ctx context.Context, meta drkey.HostHostMeta) (drkey.HostHostKey, error)
}

Fetcher obtains end host keys from the local CS.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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