func (s *Store) GetActor(iri *url.URL) (*vocab.ActorType, error) {
	s.mutex.RLock()
	defer s.mutex.RUnlock()
	logger.Debugf("[%s] Retrieving actor [%s]", s.serviceName, iri)
	a, ok := s.actorStore[iri.String()]
	if !ok {
		return nil, spi.ErrNotFound
	}
	return a, nil
}
GetActor returns the actor for the given IRI. Returns an ErrNoFound error if the actor is not in the store.
package memstore
import (
	"fmt"
	"net/url"
	"sort"
	"sync"
	"github.com/trustbloc/edge-core/pkg/log"
	"github.com/trustbloc/orb/pkg/activitypub/store/spi"
	"github.com/trustbloc/orb/pkg/activitypub/store/storeutil"
	"github.com/trustbloc/orb/pkg/activitypub/vocab"
)
var logger = log.New("activitypub_memstore")
type Store struct {
	serviceName     string
	activityStore   *activityStore
	referenceStores map[spi.ReferenceType]*referenceStore
	actorStore      map[string]*vocab.ActorType
	mutex           sync.RWMutex
}
func New(serviceName string) *Store {
	return &Store{
		serviceName:   serviceName,
		activityStore: newActivitiesStore(),
		referenceStores: map[spi.ReferenceType]*referenceStore{
			spi.Inbox:        newReferenceStore(),
			spi.Outbox:       newReferenceStore(),
			spi.PublicOutbox: newReferenceStore(),
			spi.Follower:     newReferenceStore(),
			spi.Following:    newReferenceStore(),
			spi.Witness:      newReferenceStore(),
			spi.Witnessing:   newReferenceStore(),
			spi.Like:         newReferenceStore(),
			spi.Liked:        newReferenceStore(),
			spi.Share:        newReferenceStore(),
			spi.AnchorEvent:  newReferenceStore(),
		},
		actorStore: make(map[string]*vocab.ActorType),
	}
}
func (s *Store) PutActor(actor *vocab.ActorType) error {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	logger.Debugf("[%s] Storing actor [%s]", s.serviceName, actor.ID())
	s.actorStore[actor.ID().String()] = actor
	return nil
}