agency

package
v0.25.6 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package agency offers mainly internal services for Agency framework to help implement multi tenant agent service.

Please note that some of the exported methods and variables aren't important for framework user. They are exposed because the refactoring was done in hurry and we didn't have time to move some of them to internal package.

Index

Constants

View Source
const (
	ProtocolPath = "a2a" // default for A2A Protocols (Aries), serviceName2
)

Variables

View Source
var (
	Register utils.Reg // stores Agents already on-boarded, has Email as key

)

Functions

func AddHandler

func AddHandler(endpoint Endpoint, handler ssi.Agent)

func AddSeedHandler

func AddSeedHandler(endpoint Endpoint, handler comm.SeedHandler)

func Backup

func Backup()

func CurrentTr

func CurrentTr(addr *endp.Addr) txp.Trans

CurrentTr returns current Transport according the PL receiver.

func Handler

func Handler(endpoint Endpoint) (handler comm.Handler)

TODO LAPI: endpoint type and name of the argument is misleading

func HandlerCount

func HandlerCount() int

func IsHandlerInThisAgency

func IsHandlerInThisAgency(rcvrDID string) (is bool)

IsHandlerInThisAgency checks and prepares the endpoint. If the valid endpoint doesn't yet have a CA, it will be constructed from a seed. This is called intensively during the agency's run. It is somewhat optimized with read locks and lazy fetch.

func RcvrCA

func RcvrCA(cnxAddr *endp.Addr) comm.Receiver

RcvrCA returns the CA which is the actual PL receiver and Handler.

func ReceiverCA

func ReceiverCA(cnxAddr *endp.Addr) comm.Receiver

ReceiverCA returns the CA which decrypts PL.

func ResetRegistered

func ResetRegistered(filename string) error

ResetRegistered sets the correct filename for our persistent storage and cleans it empty.

func SaveRegistered

func SaveRegistered()

SaveRegistered saves registered CAs to the file. In most cases we handle this inside the package. This file based persistence system will change in the future.

func SeedHandlerCount

func SeedHandlerCount() int

Types

type Endpoint

type Endpoint = string

Jump to

Keyboard shortcuts

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