Documentation ¶
Overview ¶
Package meta provides tool for reading metadata from services declaring "MetaProvider" support
Index ¶
- Constants
- type Loader
- type NsProvider
- func (p *NsProvider) Clear()
- func (p *NsProvider) CloseStreamers() error
- func (p *NsProvider) ExcludeIndexes() map[string]struct{}
- func (p *NsProvider) IncludedIndexes() map[string]struct{}
- func (p *NsProvider) InitStreamers(ctx context.Context) error
- func (p *NsProvider) Load()
- func (p *NsProvider) Namespaces() map[string]*idm.UserMetaNamespace
- func (p *NsProvider) ReadNode(node *tree.Node) (*tree.Node, error)
- func (p *NsProvider) Watch(ctx context.Context)
Constants ¶
const ( ServiceMetaProvider = "MetaProvider" ServiceMetaNsProvider = "MetaNsProvider" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
func NewStreamLoader ¶
type NsProvider ¶
type NsProvider struct { sync.RWMutex // this handles a lock for the namespaces field Ctx context.Context // contains filtered or unexported fields }
NsProvider lists all namespaces info from services declared ServiceMetaNsProvider It watches events to maintain the list
func NewNsProvider ¶
func NewNsProvider(ctx context.Context) *NsProvider
NewNsProvider creates a new namespace provider
func (*NsProvider) Clear ¶
func (p *NsProvider) Clear()
Clear unload cached data to force reload at next call
func (*NsProvider) CloseStreamers ¶
func (p *NsProvider) CloseStreamers() error
CloseStreamers closes all prepared streamer clients
func (*NsProvider) ExcludeIndexes ¶
func (p *NsProvider) ExcludeIndexes() map[string]struct{}
ExcludeIndexes lists namespaces that should not be indexed by search engines
func (*NsProvider) IncludedIndexes ¶
func (p *NsProvider) IncludedIndexes() map[string]struct{}
IncludedIndexes lists namespaces that should be indexed by search engines
func (*NsProvider) InitStreamers ¶
func (p *NsProvider) InitStreamers(ctx context.Context) error
InitStreamers prepares a set of NodeProviderStreamerClients ready to be requested
func (*NsProvider) Load ¶
func (p *NsProvider) Load()
Load finds all services declared as ServiceMetaNsProvider and call them to list the namespaces they declare
func (*NsProvider) Namespaces ¶
func (p *NsProvider) Namespaces() map[string]*idm.UserMetaNamespace
Namespaces lists all known usermeta namespaces
func (*NsProvider) Watch ¶
func (p *NsProvider) Watch(ctx context.Context)
Watch watches idm ChangeEvents to force reload when metadata namespaces are modified