directory

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSyncAlreadyRunning = errors.New("directory sync is already running")
	ErrSyncNotRunning     = errors.New("directory sync is not running")
)

Functions

This section is empty.

Types

type PaginatedMembersIterator

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

func ListMembers

func ListMembers(client gds.Directory) *PaginatedMembersIterator

func (*PaginatedMembersIterator) Err

func (*PaginatedMembersIterator) Members

func (*PaginatedMembersIterator) Next

func (i *PaginatedMembersIterator) Next() bool

type Sync

type Sync struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Syncs the VASPs stored in the Global TRISA Directory (GDS) to local storage for easier counterparty lookup and analysis. This is a background routine that runs at a specified interval and ensures that only counterparties managed by the sync tool are updated in the local database.

func New

func New(conf config.DirectorySyncConfig, network network.Network, store store.CounterpartyStore, echan chan<- error) (s *Sync, err error)

Creates a new directory synchronization service but does not run it.

func (*Sync) Counterparty

func (s *Sync) Counterparty(vaspID string) (vasp *models.Counterparty, err error)

func (*Sync) MakeSourceMap

func (s *Sync) MakeSourceMap() (local map[string]ulid.ULID, err error)

func (*Sync) Run

func (s *Sync) Run() error

Run the directory synchronization service.

func (*Sync) Stop

func (s *Sync) Stop() error

Stop the directory synchronization service, blocking until the service is shutdown.

func (*Sync) Sync

func (s *Sync) Sync() (err error)

Jump to

Keyboard shortcuts

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