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
- Variables
- func AddHandler(endpoint Endpoint, handler ssi.Agent)
- func AddSeedHandler(endpoint Endpoint, handler comm.SeedHandler)
- func Backup()
- func Handler(endpoint Endpoint) (handler comm.Handler)
- func HandlerCount() int
- func IsHandlerInThisAgency(rcvrDID string) (is bool)
- func RcvrCA(cnxAddr *endp.Addr) comm.Receiver
- func ReceiverCA(cnxAddr *endp.Addr) comm.Receiver
- func ResetRegistered(filename string) error
- func SaveRegistered()
- func SeedHandlerCount() int
- type Endpoint
Constants ¶
const (
ProtocolPath = "a2a" // default for A2A Protocols (Aries), serviceName
)
Variables ¶
var (
Register utils.Reg // stores Agents already on-boarded, has Email as key
)
Functions ¶
func AddHandler ¶
func AddSeedHandler ¶
func AddSeedHandler(endpoint Endpoint, handler comm.SeedHandler)
func HandlerCount ¶
func HandlerCount() int
func IsHandlerInThisAgency ¶
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 ReceiverCA ¶
ReceiverCA returns the CA which decrypts PL.
func ResetRegistered ¶
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