// NewService returns a new NodeInfo service.
// If this Orb server uses a storage provider that can do queries using 2 tags, then we can take advantage of a
// feature in the underlying Aries storage provider to update the stats more efficiently.
// If logger is nil, then a default will be used.
NewService returns a new NodeInfo service.
If this Orb server uses a storage provider that can do queries using 2 tags, then we can take advantage of a
feature in the underlying Aries storage provider to update the stats more efficiently.
If logger is nil, then a default will be used.
// NewService returns a new NodeInfo service . // If this Orb server uses a storage provider that can do queries using 2 tags then we can take advantage of a // feature in the underlying Aries storage provider to update the stats more efficiently . // If logger is nil then a default will be used .
func NewService(serviceIRI *url.URL, refreshInterval time.Duration, apStore apstore.Store,
	multipleTagQueryCapable bool, logger logger) *Service {
	if logger == nil {
		logger = log.New("nodeinfo")
	}
	r := &Service{
		apStore:                 apStore,
		serviceIRI:              serviceIRI,
		done:                    make(chan struct{}),
		interval:                refreshInterval,
		stats:                   &stats{},
		multipleTagQueryCapable: multipleTagQueryCapable,
		logger:                  logger,
	}
	r.Lifecycle = lifecycle.New("nodeinfo",
		lifecycle.WithStart(r.start),
		lifecycle.WithStop(r.stop))
	return r
}
func NewService ( serviceIRI * url . URL , refreshInterval time . Duration , apStore apstore . Store , multipleTagQueryCapable bool , logger logger ) * Service { if logger == nil { logger = log . New ( " " ) } r := & Service { apStore : apStore , serviceIRI : serviceIRI , done : make ( chan struct { } ) , interval : refreshInterval , stats : & stats { } , multipleTagQueryCapable : multipleTagQueryCapable , logger : logger , } r . Lifecycle = lifecycle . New ( " " , lifecycle . WithStart ( r . start ) , lifecycle . WithStop ( r . stop ) ) return r }
NewService returns a new NodeInfo service.
NewService returns a new NodeInfo service .