make method to get data out of a module

This commit is contained in:
Joel Wetzell
2026-03-04 12:35:15 -06:00
parent 0d4ec24a9b
commit 6a21cc2639
21 changed files with 163 additions and 0 deletions

View File

@@ -113,3 +113,14 @@ func (pc *PSNClient) Output(ctx context.Context, payload any) error {
func (pc *PSNClient) Stop() {
pc.cancel()
}
func (pc *PSNClient) Get(key string) (any, error) {
switch key {
case "trackers":
return pc.decoder.Trackers, nil
case "name":
return pc.decoder.SystemName, nil
default:
return nil, errors.New("psn.client key not found")
}
}